[wpkg-users] reboot problem

Tomasz Chmielewski mangoo at wpkg.org
Tue Dec 11 22:38:04 CET 2007


Yet another message sourceforge didn't deliver to me this month :( 
Prepare for a mailing list address change, soon.

> I have a problem with the option "reboot=true" in the tags "package".
>  
> When a package is installed at boot and reboot option is "true", rather than restart, WPKG ends and the computer goes to login. It's boring because it is necessary to manually restart the system to continue software installations. 
>  
> The log shows that the script wpkg.js runs well the function  "reboot()". There is no error in the log.
>  
> I am using Windows XP SP2 on a virtual machine VMWARE to test my packages. Is it because of VMWARE?
>  
> I tested 3 opportunities in wpkg.js :
>  
> 1 / rebootCmd = "standard" >>> function win32Shutdown() of the class WMI: Win32_OperatingSystem.2 / rebootCmd = "special" + psshutdown.exe placed in \\server\WPKG\tools. >>> tool sysinternals.3 / rebootCmd = "shutdown" + add this code in the switch-case of the function reboot() :
> case "shutdown":
> info("Test a shutdown command: shutdown -r -f -t 0");
> exec("shutdown -r -f -t 0",0);
> break;
>>>> comand of Windows.
>  
>  
> No way to restart the computer. Why ? 
> I don’t understand why ?Do you understand ? 

Rebooting from cscript during computer bootup will work under Windows 
2000. In Windows XP, this behaviour changed, and won't work anymore.

That's why for Windows XP in order to use this feature, you have to 
either use WPKG Client as well, or use psshutdown.exe.

With WPKG Client and wpkg.js on a Windows XP machine, it works like that:


- wpkg.js schedules a reboot, which is happily ignored by the system
- after wpkg.js schedules a reboot, it exits with code 3010
- WPKG Client redas this exit code, knows it means a reboot is needed, 
and reboots the machine

WPKG Client has a mechanism which will prevent it from rebooting 
indefinitely (i.e., you made a broken package which never installs 
reboots the machine, after the reboot wpkg.js detects that it's not 
installed, tries the installation again, reboots etc.). It will reboot 
up to five times in a row; then, wpkg.js has to exit with a code 
different from 3010.

Again, under Windows 2000 there is a risk of rebooting indefinitely - 
because rebooting from cscript during bootup works in Windows 2000.




-- 
Tomasz Chmielewski
http://wpkg.org

-------------------------------------------------------------------------
SF.Net email is sponsored by: 
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://sourceforge.net/services/buy/index.php
-------------------------------------------------------
Easy Software Deployment >> http://wpkg.org
_______________________________________________
wpkg-users mailing list
wpkg-users at lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wpkg-users


More information about the wpkg-users mailing list