grimmlock Posted January 16, 2013 Share Posted January 16, 2013 (edited) Good Morning, I want to take this: Run("cmd.exe") Sleep(1000) Send("cd /{Enter}") Sleep(1000) Send("cd pstools{Enter}") Sleep(1000) Send("psexec \\192.168.26.17\ cmd.exe{Enter}") Sleep(5000) Send("cd /{Enter}") Sleep(2000) Send("cd Program Files\WebHelpDesk{Enter}") Sleep(2000) Send("whd_stop.bat{Enter}") and make it into something like this Run("c:\psexec \\192.168.26.17 -s c:\program files\webhelpdesk\whd_stop.bat") However when I run the second one, I get an error that states that PSEXEC is already running on the remote PC. It would appear that it is trying to run the script however something in the translatation is causing PSEXEC on the remote PC to hang. Any ideas on what is wrong with the script? I goal here is to execute the remote batch file but have the cmd window open and showing the results on my local PC. Thanks, Grimm Edited January 16, 2013 by grimmlock Thanks Grimm Link to comment Share on other sites More sharing options...
spudw2k Posted January 16, 2013 Share Posted January 16, 2013 (edited) Does this work? Run('c:\psexec \\192.168.26.17 -s "c:\program files\webhelpdesk\whd_stop.bat"') edit: Removed URL tags when copied and pasted edit: I am assuming that path and file exists on the destination machine? Edited January 16, 2013 by spudw2k Spoiler Things I've Made: Always On Top Tool ◊ AU History ◊ Deck of Cards ◊ HideIt ◊ ICU ◊ Icon Freezer ◊ Ipod Ejector ◊ Junos Configuration Explorer ◊ Link Downloader ◊ MD5 Folder Enumerator ◊ PassGen ◊ Ping Tool ◊ Quick NIC ◊ Read OCR ◊ RemoteIT ◊ SchTasksGui ◊ SpyCam ◊ System Scan Report Tool ◊ System UpTime ◊ Transparency Machine ◊ VMWare ESX Builder Misc Code Snippets: ADODB Example ◊ CheckHover ◊ Detect SafeMode ◊ DynEnumArray ◊ GetNetStatData ◊ HashArray ◊ IsBetweenDates ◊ Local Admins ◊ Make Choice ◊ Recursive File List ◊ Remove Sizebox Style ◊ Retrieve PNPDeviceID ◊ Retrieve SysListView32 Contents ◊ Set IE Homepage ◊ Tickle Expired Password ◊ Transpose Array Projects: Drive Space Usage GUI ◊ LEDkIT ◊ Plasma_kIt ◊ Scan Engine Builder ◊ SpeeDBurner ◊ SubnetCalc Cool Stuff: AutoItObject UDF ◊ Extract Icon From Proc ◊ GuiCtrlFontRotate ◊ Hex Edit Funcs ◊ Run binary ◊ Service_UDF Link to comment Share on other sites More sharing options...
grimmlock Posted January 17, 2013 Author Share Posted January 17, 2013 Yea and that worked, Thank you!! Grimm Thanks Grimm 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