From WPKG | Open Source Software Deployment and Distribution
Jump to: navigation, search

I used something like <install cmd='\\server\path\script.cmd' />. But as long as script.cmd is larger than appr. 2500Bytes WSH seems to stuck. I decided to split my script into 3 Parts, each smaller than 2500Bytes.

Does the script make a lot of output to the console?
Only something like Executing script.cmd ..., when client is configured with /debug-Option (and of course /synchronize). The script itselfs contains several shortcut.exe-statements to create shortcuts in a certain folder. Shortcut.exe itselfs produces messeages to the commandline, but they do (unfortunatly) not apear on the consle of WSH.
I mean, does the "\\server\path\script.cmd" produce a lot of output when started from cmd.exe? If so, add >nul in the install cmd to silence it; probably yu are using /quiet flag, which enables logging to Event Log, and it is getting full. See also FAQ (or here: FAQ:en).
There is no difference wether /quiet is set or not. But with @echo off at the beginning of the script and >null added to the cmd statement, everything is fine now.

I'd like to check for filedate, timestamp or MD5-Hash. Is there a simple way to do so ?


After a few hours wrestling with this, and checking small test js scripts, I tried using &#92 instead of backslash in the registry key path - voila! it worked, having tried single and doubled slashes.

eg., <check type="registry" condition="equals" path="HKEY_LOCAL_MACHINE&#92;SOFTWARE&#&#92;Microsoft&#92;Windows&#92;CurrentVersion&#92;Installer&&#92;UserData&#92;S-1-5-18&#92;Products&&#92;3e43b73803c7c394f8a6b2f0402e19c2&#92;InstallProperties&#92;DisplayName" value="Microsoft Visual C++ 2005 Redistributable" />

Badcop666 11:28, 14 October 2010 (CEST)


workdir is a useful attribute that should be documented on this page.