Changes
FAQ
,no edit summary
[[category:Documentation]]
[[category:Installation]]
== My install command just stalls and never finishes ==
Ufortunately 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 redirect the output to a file or NUL by appending ">NUL 2>&1" to the command.
For example
<install cmd='%SOFTWARE%\my-installer.exe /S' />
can be turned into:
<install cmd='%SOFTWARE%\my-installer.exe /S >NUL 2>&1' />
or re-directing the output to a file:
<install cmd='%SOFTWARE%\my-installer.exe /S >%TEMP%\install-log.txt 2>&1' />
This effectively prevents the buffer to fill up and your commands will finish properly.