oiiuu Posted February 8, 2011 Share Posted February 8, 2011 Hii all first im a rooki in autoit now my question i need to run order in cmd like shutdown -s -t 3600 to make auto shutdown and i cant find the code ( then mah sec question what is the best code i have to use to make a timer for shut down ....... pls help me and sorry for mah bad english Link to comment Share on other sites More sharing options...
somdcomputerguy Posted February 8, 2011 Share Posted February 8, 2011 Look at Time Machine's #1, 2, and 3. http://www.autoitscript.com/forum/index.php?s=&showtopic=19370&view=findpost&p=298158 Read thru the Helpfile for the Shutdown function. Search thru the Examples forum for more, uh, examples. There are at least a few posts there that do exactly or real close to what you are attempting. Welcome to the Forums. Good luck! - Bruce /*somdcomputerguy */ If you change the way you look at things, the things you look at change. Link to comment Share on other sites More sharing options...
Monolith Posted February 8, 2011 Share Posted February 8, 2011 Hi mate, here is a basic structure to help you on your way, $shutdowncmd = "Shutdown" $machine = InputBox("", "input target machine name", @ComputerName, "") $time = inputbox("", "Input Desired Time", "", "") $msg = InputBox("", "Input desired message", "", "") $arg = "-s" ;this could be any valid argument $cmd1 = run(@ComSpec & " /k " & $shutdowncmd & " " & $arg & " " & "-m" & " " & "\\" & $machine & " " & "-t" & " " & $time & " " & "-c" & " " & '"' & $msg & '"',@SystemDir, @SW_SHOW) Exit Link to comment Share on other sites More sharing options...
oiiuu Posted February 8, 2011 Author Share Posted February 8, 2011 ty guys 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