OmYcroN Posted June 9, 2008 Share Posted June 9, 2008 How can i find out if windows needs to be restarted ? For example Nero knows that this must be done and alerts me. How can i do that in autoit ? It s a value from registry ? Link to comment Share on other sites More sharing options...
martin Posted June 9, 2008 Share Posted June 9, 2008 How can i find out if windows needs to be restarted ? For example Nero knows that this must be done and alerts me. How can i do that in autoit ? It s a value from registry ?I would expect that when a program makes some changes, or installs some software which only starts working correctly when Windows restarts, then that program will say that Windows needs to be restarted. I wouldn't expect that there is a way one program would know that another needed Windows to restart, unless you could detect that a more recent version of the kernel had been installed but was not running. I might be wrong of course. Serial port communications UDF Includes functions for binary transmission and reception.printing UDF Useful for graphs, forms, labels, reports etc.Add User Call Tips to SciTE for functions in UDFs not included with AutoIt and for your own scripts.Functions with parameters in OnEvent mode and for Hot Keys One function replaces GuiSetOnEvent, GuiCtrlSetOnEvent and HotKeySet.UDF IsConnected2 for notification of status of connected state of many urls or IPs, without slowing the script. Link to comment Share on other sites More sharing options...
OmYcroN Posted June 9, 2008 Author Share Posted June 9, 2008 (edited) You can be right. Thanks anyways ... I m having hard times with nero to install it after office ... i d like to detect if office was instlled in the same session when i start installing nero Edited June 9, 2008 by OmYcroN Link to comment Share on other sites More sharing options...
yucatan Posted June 10, 2008 Share Posted June 10, 2008 You can be right. Thanks anyways ... I m having hard times with nero to install it after office ... i d like to detect if office was instlled in the same session when i start installing nerojust make something lissenwhen the autoit script is runned at the end of the script make a reg key or make a filein the beginning of the script check if the regkey/file exsist if fileexsist "" then exit or if the file already exsist then its runned one time in the beginning if fileexsist run1.txt thenmsgbox pc is restarted one timeif fileexsist run2.txt thenmsgbox pc is restarted 2 timeslike that etc etc further do you understand ?at the end of the script doif fileexsist run1.txt then msgbox pc is restarted one time filewrite run2.txt Link to comment Share on other sites More sharing options...
martin Posted June 10, 2008 Share Posted June 10, 2008 just make something lissenwhen the autoit script is runned at the end of the script make a reg key or make a filein the beginning of the script check if the regkey/file exsist if fileexsist "" then exit or if the file already exsist then its runned one time in the beginning if fileexsist run1.txt thenmsgbox pc is restarted one timeif fileexsist run2.txt thenmsgbox pc is restarted 2 timeslike that etc etc further do you understand ?No.at the end of the script doif fileexsist run1.txt then msgbox pc is restarted one time filewrite run2.txtMaybe you are talking about RunOnce which is a registry entry for programs to be run when Windows starts, and once started Windows deletes the registry entry so it isn't run again next time Windows starts. Serial port communications UDF Includes functions for binary transmission and reception.printing UDF Useful for graphs, forms, labels, reports etc.Add User Call Tips to SciTE for functions in UDFs not included with AutoIt and for your own scripts.Functions with parameters in OnEvent mode and for Hot Keys One function replaces GuiSetOnEvent, GuiCtrlSetOnEvent and HotKeySet.UDF IsConnected2 for notification of status of connected state of many urls or IPs, without slowing the script. Link to comment Share on other sites More sharing options...
damian666 Posted June 11, 2008 Share Posted June 11, 2008 well, i could be wrong, but i think there is indeed a kind of a regentry for that on windows... beats me what it is, but i have seen other programs tell me that there was a unfinished program install, and that i needed ot reboot before the next program could be installed so. it could really well be runonce btw... Damian666 and proud of it!!! Link to comment Share on other sites More sharing options...
inet Posted June 14, 2008 Share Posted June 14, 2008 just make something lissen when the autoit script is runned at the end of the script make a reg key or make a file in the beginning of the script check if the regkey/file exsist if fileexsist "" then exit or if the file already exsist then its runned one time in the beginning if fileexsist run1.txt then msgbox pc is restarted one time if fileexsist run2.txt then msgbox pc is restarted 2 times like that etc etc further do you understand ? at the end of the script do if fileexsist run1.txt then msgbox pc is restarted one time filewrite run2.txt this will NOT check if a reboot is NEEDED. It will only look if there HAS BEEN a reboot, so that won't help. Try this: Func Check_Reboot() $a_Value = RegRead("HKLM\SOFTWARE\Microsoft\Updates\UpdateExeVolatile", "Flags") If @error Or $a_Value == 0 Then $a_Status = 0 Else $a_Status = 1 EndIf SetError(0) $b_Value = RegRead("HKLM\SYSTEM\CurrentControlSet\Control\Session Manager", "PendingFileRenameOperations") If @error Then $b_Status = 0 Else $b_Status = 1 EndIf If $a_Status == 1 Or $b_Status == 1 Then;Computer needs reboot Return True EndIf EndFunc Link to comment Share on other sites More sharing options...
damian666 Posted June 14, 2008 Share Posted June 14, 2008 wow, thats a nice function man, thanx... so i was right about that regentry cool Damian666 and proud of it!!! Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now