[wpkg-users] timeout no error
Rainer Meier
r.meier at wpkg.org
Sun Jul 20 11:24:54 CEST 2014
Hi Andrea,
On 20.07.2014 10:06, Andrea Zagli wrote:
> but is there a way to not consider the timeout an error? i ask it because i have
> seen that the software works if i interrupt the installation at the time it hangs
No and there should be no such option.
However if you are not interested in the command to complete and its result,
then you might run the installer in a cmd script and launch it with "start" so
the install process detaches and WPKG continues even though the installation is
still ongoing. You can combine this with scripting to wait for certain results.
For example a simple cmd script like this:
@echo off
:: Launch installation.
start "Installation" "install.exe" /silent-option
:: Wait for 30 seconds
ping -n 10 localhost >NUL
:: Terminate with success exit code
exit /b 0
This would make the cmd script wait for 10 seconds and then terminate with exit
code 0 (success) no matter what the results of install.exe are or whether it
terminated. You might extend this with some taskkill command to terminate
install.exe if still running after a timeout.
Though all this is considered very very bad practice due to various reasons
including
- You don't know the real installation status
- Installation might not have been completed
- Installation might ask interactively for some reason; perhaps some product
features will not work
...
It would be much better to analyze why the installer actually hangs and prompts
for interactive user input and solve this issue and fix it. WPKG is made to run
silent installations and this installation seems to be clearly not silent.
Consider enabling the "Interactive Services Detection" service to get notified
about dialog boxes opened by WPKG commands. Then find a way to run the installer
silently. If everything fails with the default installer, then you might have to
re-pack the software in a silent installer. I had to do this on a couple of
occasions and had good results with simple CMD scripts and self-extracing 7-zip
archives. Alternatively contact the software vendor to fix the installer if it
claims to be non-interactive/silent but still prompts the user interactively
which is clearly considered to be a bug in the installer.
br,
Rainer
More information about the wpkg-users
mailing list