Qball Posted December 19, 2009 Share Posted December 19, 2009 i am attempting to replace the windows shutdown function with my own. when it shuts down i would like to perform a task and restart the computer instead. is there any way to do this? ive tried the onautoitexit() function but i cant get it to restart instead of powering off after the task. and i would also like to know if there is a way for autoit to tell the difference between a shutdown and a restart. thanks for any help Link to comment Share on other sites More sharing options...
Innovative Posted December 19, 2009 Share Posted December 19, 2009 Run(@ComSpec & " /c " & 'shutdown /r', "", @SW_HIDE) Link to comment Share on other sites More sharing options...
rajeshontheweb Posted December 19, 2009 Share Posted December 19, 2009 follow innovative's example just go through command prompt shutdown /? help info to see what are the options u have for shutdown / force shutdown / restart , etc if u want native autoit command for shutdown, use Shutdown(code) 1 shutdown 2 reboot this is straight from help file.. Started late is much better than having never started it!!!!Failure is another step towards success. I've been messing around with: Adding Entry to 'Hosts'File Information Lister (Logger)Yet Another AutoIT Error Handler Yet Another AutoIT Error Handler & Debugger Control your App's TaskBar Button YCurrency Ticker (Latest Release : 16 Apr 2009)_WinInetInternetCheckConnection UDF Symantec Definitions Lister UDF _GetLocalIPAddresses UDF UDF to get Special Folder Information WMI_NetworkAdapterConfiguration2Array WMI_CDRomDriveCapabilities _ScriptExists - Check if your au3 script is running!! Uninstaller UDF Get Version for your application (at script level or compiled stage) Uninstaller Pro - faster alternative to windows application removal applet 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