Can't find the information you are looking for here? Then leave a message over on our WinBatch Tech Support Forum.
Keywords: Detect Windows Reboot Needed
Here's the magic key:
If RegExistValue(@RegMachine,"System\CurrentControlSet\Control\Session Manager[PendingFileRenameOperations]") Then *RebootRequired*
In 95/98/ME check for the existence of the file wininit.ini in the windows directory. (There is probably a wininit.bak from a previous reboot there)
In Windows NT/2000/XP I don't think there is a flag persay that you can check, however most of the time the reason for the reboot is so that system files can be updated.
The list of files to be updated is stored someplace in the registry. If you can find the spot in the registry where the files are stored...then you can look there.
....
To find it...
C:\temp\aaa.txt and c:\temp\bbb.txtcontents do not matter.
handle=FileOpen("C:\temp\aaa.txt","READ") Message("TESTING","DO NOT PRESS OK") FileCLose(handle)
IntControl(30,"c:\temp\bbb.txt","c:\temp\aaa.txt",0,0)
Article ID: W15276
File Created: 2002:09:05:13:50:56
Last Updated: 2002:09:05:13:50:56