PDA

View Full Version : Quick Tip: 'Pending Reboot Operations'


SUF6NEWBIE
08-20-2004, 04:22 PM
If you would like to maually check if system operations
of some form have been scheduled to run on the Next
Reboot of the System. Here is the usual key-value to check:

*May need to Be Logged in with Administrative Privilages to access this Key*
on NT based Systems

Quick and Dirty eg:

--Code:
PendRename = Registry.GetValue(HKEY_LOCAL_MACHINE, "SOFTWARE\\CurrentControlSet\\Control\\Session Manager", "PendingFileRenameOperations", true);
if (PendRename ~= "") then --value-s are present (expandable type)
reboot = true; --controls a message box to trigger if you would like
end

Basically if this key VALUE is not present...no reboot operations are scheduled

if you wish to encourage-enforce a Reboot on App Exit.

one place to call the System.Reboot action is in On Shutdown actions

eg:
make this the Last action in Shutdown actions
--Code:
if (reboot == true) then
--could place a message dialog Yes\No or similar here
--warn if applications are Open..please close now etc
Application.Sleep(2000); --tweak this or remove it
System.Reboot(); --attempts to immediately(enforce) rebooting the PC
end


may prove usefull sometime...