Sign in to follow this  
Followers 0
oiiuu

Pls Help Me Help Me Pls with Cmd

4 posts in this topic

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

Share this post


Link to post
Share on other sites



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.

Share this post


Link to post
Share on other sites

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

Share this post


Link to post
Share on other sites

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 account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0