dilipped Posted August 14, 2014 Share Posted August 14, 2014 (edited) I am trying to run an AutoIt script on a remote machine. psexec.exe -accepteula \\remotemachine -u admin -p password "C:\Program Files\AutoIt3\AutoIt3.exe" "C:\Users\admin\runNotepad.au3" I am trying to open a Notepad from the script and write something in it. I am also writing some logs from the script. Although I can see the logs, but I am not able to see anything happening on the screen. I tried with argument -i 0 which opens an interactive screen which is not same as running the script on a local machine. e.g. I will have to accept the interactive session and sometimes it does not show up. Sometimes then windows explorer does not open if I say Run("explorer.exe") from the script Is there any other way to do it? I tried creating an exe but it still goes into the interactive session window which I cannot handle remotely. I tried running it through a batch file but it does not work either. Edited August 14, 2014 by dilipped Link to comment Share on other sites More sharing options...
x001z Posted August 14, 2014 Share Posted August 14, 2014 Use the psexec -i so you can interact with the desktop Link to comment Share on other sites More sharing options...
dilipped Posted August 14, 2014 Author Share Posted August 14, 2014 Use the psexec -i so you can interact with the desktop I tried with -i as well as -i 0 but it does not work for me. Link to comment Share on other sites More sharing options...
x001z Posted August 14, 2014 Share Posted August 14, 2014 Most of the time you have to use the same user logged on the remote pc, what has work for me sometimes, is run a batch file in the remote pc that runs the script file, instead runing the script. And use also -s psexec -i -s Link to comment Share on other sites More sharing options...
newniman Posted September 25, 2015 Share Posted September 25, 2015 For the record,the following single line local script ran existing remote script "C:\WIP-GUI.au3" fine:Run('psexec \\remotemachine -u admin -p password -i -d "C:\Program Files\Autoit3\AutoIt3.exe" C:\WIP-GUI.au3', '', @SW_HIDE)Local was Win7 Professional 64bitRemote was WinXP Professional 32bit on which I first had to Access hidden share:Start > Run > secpol.msc > Local Policies > Security Options > Network Access: Sharing and security model for local accounts > Classic – local users authenticate as themselves 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