View Full Version : Update on reboot not working ?
Hi All,
We are trying to run a patch on WinXP SP2 client.
We have our own application running on the computer instead of the explorer.
When running the patch everything looks good, the logfile tells us some files
is in use (update on reboot), problem is this never happends.
How does the files get replaced after reboot, do we need explorer running ?
Is there some script/exe we can run manually from within our application, to
finish the patch process ?
Thanks
/jope
Lorne
11-06-2006, 12:57 PM
We are trying to run a patch on WinXP SP2 client.
We have our own application running on the computer instead of the explorer.Just to clarify, do you mean that you are running a different shell, similar to XP Lite for example?
When running the patch everything looks good, the logfile tells us some files is in use (update on reboot), problem is this never happends.After rebooting the files don't get replaced with the updated versions?
How does the files get replaced after reboot, do we need explorer running ?If a file is in use, the runtime creates a temporary copy and patches that, then schedules a switcheroo on the next reboot.
On WinNT, it schedules a file move using a MoveFileEx() API call.
On Win9x, it adds a Rename entry to the WININIT.INI using a WritePrivateProfileString() API call.
If your shell doesn't implement those features then the replacement on reboot won't happen automatically.
Is there some script/exe we can run manually from within our application, to finish the patch process ?I'm not sure if there is currently any way to determine which files are waiting on a reboot to complete the patching process...there may be a way to mine the information from a script, for example in On Post Patch or On Shutdown, but I'm not sure. I don't think the g_OnFileProcessed function exposes that information; it will probably just declare the file as patched. (That might be something we would need to change in a future subrelease.) There may be another way to get at this information, though; it might be easier for your shell to respond to those API calls.
Just to clarify, do you mean that you are running a different shell, similar to XP Lite for example?
This is a regular Win XP installation with a lot of tweeks to make our application start immediately after login. No Windows Explorer.
After rebooting the files don't get replaced with the updated versions?
Exactly...
On WinNT, it schedules a file move using a MoveFileEx() API call.
With this information google gave some more information.
http://support.microsoft.com/kb/202071
For the MOVEFILE_DELAY_UNTIL_REBOOT flag, the calling process needs to be in the context of a user who belongs to the administrator group or the LocalSystem account. By default, only Administrators and LocalSystem have write access to the HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Contro l\Session Manager
Probably the calling process dont have enough permissions..
Will check this tomorrow!
Thank you very much for the quick response!
/jope
Someone else might find this information useful..
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Contro l\Session Manager
Allowing our user to write to this registry key did the trick, we are now able to run our upgrade package as our regular user (no admin), even if the files are in use when performing upgrade...
Thanks again...
vBulletin® v3.8.4, Copyright ©2000-2009, Jelsoft Enterprises Ltd.