Erlend Posted July 17, 2007 Share Posted July 17, 2007 Hello i have som problems getting this script to work: Run("c:\rb3000vpn\plink admin@myip -pw mypwd") sleep(5000) send("2") sleep(5000) send("{ENTER}") sleep(5000) send("3") sleep(5000) send("{ENTER}") sleep(5000) send("2") sleep(5000) send("{ENTER}") sleep(5000) send("2") sleep(5000) send("{ENTER}") sleep(5000) send("4") sleep(5000) send("{ENTER}") sleep(5000) send("05:00") sleep(5000) send("{ENTER}") sleep(5000) ProcessClose("plink.exe") The script works when the user is logged on the workstaion, but not when i locked. i am now trying to use ControlSend here is a test script i am curently writing to get the controls right Run("c:\windows\system32\cmd.exe") sleep(5000) ControlSend("C:\WINDOWS\system32\cmd.exe", "", "ConsoleWindowClass", "2") sleep(5000) ControlSend("c:\WINDOWS\system32\cmd.exe", "", "ConsoleWindowClass", "{ENTER}") What is wrong with the script? The cmd windows opens but nothing more hapends. Link to comment Share on other sites More sharing options...
bogQ Posted July 17, 2007 Share Posted July 17, 2007 ControlSend("C:\WINDOWS\system32\cmd.exe", "", "ConsoleWindowClass", "2") try ControlSend("C:\WINDOWS\system32\cmd.exe", "", "", "2") TCP server and client - Learning about TCP servers and clients connectionAu3 oIrrlicht - Irrlicht projectAu3impact - Another 3D DLL game engine for autoit. (3impact 3Drad related) There are those that believe that the perfect heist lies in the preparation.Some say that it’s all in the timing, seizing the right opportunity. Others even say it’s the ability to leave no trace behind, be a ghost. Link to comment Share on other sites More sharing options...
Erlend Posted July 17, 2007 Author Share Posted July 17, 2007 no, dosen't work. Link to comment Share on other sites More sharing options...
SadBunny Posted July 17, 2007 Share Posted July 17, 2007 (...) Run("c:\windows\system32\cmd.exe") sleep(5000) ControlSend("C:\WINDOWS\system32\cmd.exe", "", "ConsoleWindowClass", "2") sleep(5000) ControlSend("c:\WINDOWS\system32\cmd.exe", "", "ConsoleWindowClass", "{ENTER}") What is wrong with the script? The cmd windows opens but nothing more hapends. An MSDOS box has no controls (check it with AutoInfo - ctrl-F6 from Scite). Hence you cannot ControlSend anything to it. Try Send() or look for examples of StdOutWrite() and StdInRead() for more interaction with the dos box. Roses are FF0000, violets are 0000FF... All my base are belong to you. Link to comment Share on other sites More sharing options...
bogQ Posted July 17, 2007 Share Posted July 17, 2007 (edited) if you dont need Run("c:\windows\system32\cmd.exe") then you can try this Send("{LWIN} R") WinWaitActive("Run") ControlSend("Run", "", "", "cmd") sleep(100) ControlSend("Run", "", "", "{enter}") sleep(5000) ControlSend("C:\WINDOWS\system32\cmd.exe", "", "", "2") sleep(5000) ControlSend("c:\WINDOWS\system32\cmd.exe", "", "", "{ENTER}") this is working 4 me... Edited July 17, 2007 by bogQ TCP server and client - Learning about TCP servers and clients connectionAu3 oIrrlicht - Irrlicht projectAu3impact - Another 3D DLL game engine for autoit. (3impact 3Drad related) There are those that believe that the perfect heist lies in the preparation.Some say that it’s all in the timing, seizing the right opportunity. Others even say it’s the ability to leave no trace behind, be a ghost. Link to comment Share on other sites More sharing options...
Erlend Posted July 17, 2007 Author Share Posted July 17, 2007 Hello I desided to use putty as my terminal client, i have setup a task that runs in a minute on a locked workstation. i will update this post in a minute Link to comment Share on other sites More sharing options...
Erlend Posted July 17, 2007 Author Share Posted July 17, 2007 The change of terminal client solwed the problem. 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