Jump to content

Cooperdale

Members
  • Posts

    3
  • Joined

  • Last visited

Cooperdale's Achievements

Seeker

Seeker (1/7)

0

Reputation

  1. It worked. The only trouble was with capital letters, the window title must be the same and it is caps-sensitive. Here is the full code: Run(@ComSpec & " /c " & 'c:\Utility\Utilities\Pstools\psexec \\FUZZEEMADDER-PC -u Fuzzeemadder Rundll32 Powrprof.dll,SetSuspendState Sleep', "") WinWaitActive("C:\Windows\system32\cmd.exe") Send ("{ENTER}") Sleep (30000) ProcessClose ("psexec.exe") ProcessWaitClose ("psexec.exe") ProcessClose ("cmd.exe") Thanks a lot!
  2. Guys, thank you very much. I had already tried RunWait, but it actually stopped the Send command to kick in. PhilHibbs, I still have to try it out but it really sounds right. I will try and report back.
  3. Hello, I have a problem with this script (which is my first AutoIt script, by the way). What I want to do is automate a psexec command which will hibernate my other pc from remote. The command works, but since the other pc has no password, it prompts me for one. So I was trying to make AutoIt simulate the "enter" key to skip the password request. The script basically works, but the strange thing is, it opens two instances of the command prompt, each of them executes the psexec command but only one of them receives the simulated keystroke. Here is the script: Run(@ComSpec & " /c " & 'c:\Utility\Utilities\Pstools\psexec \\FUZZEEMADDER-PC -u Fuzzeemadder Rundll32 Powrprof.dll,SetSuspendState Sleep', "") Send ("{ENTER}") Sleep (30000) ProcessClose ("psexec.exe") ProcessWaitClose ("psexec.exe") ProcessClose ("cmd.exe") Can somebody help me? What am I doing wrong?
×
×
  • Create New...