compyutech Posted April 3, 2013 Share Posted April 3, 2013 HelloI am trying to execute batch file on server from another computer.I tried to execute using PsTool. command as followPSTools\PsExec.exe \\Serverip C:\FolderName\FileName.batIt worked successfully.But When I tried to execute same command from another machine it says that access denied.I tried sharing and unsharing folder on server also passing user and password by -u user -p password.Its working on my machine without shared forder and without passing username and password, But not working from another machine with keeping forder shared and also passing user and passwordplease write me if anyone knows. Link to comment Share on other sites More sharing options...
Tripredacus Posted April 3, 2013 Share Posted April 3, 2013 Does it work manually instead of using your script? It sounds more like a permissions issue and not so much AutoIT related. Twitter | MSFN | VGCollect Link to comment Share on other sites More sharing options...
compyutech Posted April 4, 2013 Author Share Posted April 4, 2013 Hello Tripredacus Thanks for you reply. When I login remotely in to the server and execute the batch manually it works fine. Also it is being executed by scheduler. After posting this I change the code like: PSToolsPsExec.exe -u user -p password Serverip C:FolderNameFileName.bat keeping user and password before the path. it worked in another also. Before I was writting user and password after path. But still its not working on some machine, It may be some difference related to machine. I am trying, Write if any one knows more about this problem or PsTool. Thanks. Link to comment Share on other sites More sharing options...
Gianni Posted April 4, 2013 Share Posted April 4, 2013 if you are in a network with domain you should use this sintax for the username: -u domainname\username -p password Chimp small minds discuss people average minds discuss events great minds discuss ideas.... and use AutoIt.... Link to comment Share on other sites More sharing options...
compyutech Posted April 5, 2013 Author Share Posted April 5, 2013 (edited) Hello Pincopanco, Thanks for your replay. I am using same systax: PSToolsPsExec.exe -u domainnameusername -p password IpAdderess C:FolderNameFileName.bat Its working on some computer but not on another Edited April 5, 2013 by compyutech Link to comment Share on other sites More sharing options...
Gianni Posted April 5, 2013 Share Posted April 5, 2013 .. ?? .. sorry if some questions are obvious, but do you use the same -u domain\username -p password from all computers or do you use different accounts from different computers? The username you use is a domain account or a local account of the server \\IpAdderess ? If you try to execute a direct command instead of the batch file: PSTools\PsExec.exe -u domainname\username -p password \\IpAdderess CMD are you getting a remote prompt of the \\IpAdderess machine or again the error message? can you post the autoit code you use bye Chimp small minds discuss people average minds discuss events great minds discuss ideas.... and use AutoIt.... 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