Changes

Jump to: navigation, search

FAQ

108 bytes added, 21:45, 30 March 2013
My install command just stalls and never finishes
== My install command just stalls and never finishes ==
Ufortunately Unfortunately there is a limitation of WSH which causes an executed child process to stall if the console buffer is full. The process stalls until the buffer is flushed. WPKG tried to implement proper buffer flushing to prevent this. Unfortunately the methods to check whether the buffer is empty is blocking too which means WPKG would stall when checking whether the buffer is to be flushed. Thus WPKG would be blocked and unable to check whether the command reached its timeout.
A discussion on this topic was held on Bugzilla: [http://bugzilla.wpkg.org/show_bug.cgi?id=123].
As a simple work-around just make sure your commands do not print anything on the console or <br/>redirect the output to a file or NUL by appending <b>">NUL 2>&1" </b> to the command.
For example
<source lang="xml">
<install cmd='%SOFTWARE%\my-installer.exe /S' />
</source>
can be turned into:
<source lang="xml"> <install cmd='%SOFTWARE%\my-installer.exe /S >&gt;NUL 2>&ampgt;&amp;1' /></source>
or re-directing the output to a file:
<source lang="xml"> <install cmd='%SOFTWARE%\my-installer.exe /S >&gt;%TEMP%\install-log.txt 2>&ampgt;&amp;1' /></source>
This effectively prevents the buffer to fill up and your commands will finish properly.
11
edits

Navigation menu