Sign in to follow this  
Followers 0
compyutech

psexec working on only one machine

6 posts in this topic

Hello

I am trying to execute batch file on server from another computer.

I tried to execute using PsTool. command as follow

PSTools\PsExec.exe \\Serverip C:\FolderName\FileName.bat

It 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 password

please write me if anyone knows.

Share this post


Link to post
Share on other sites

Does it work manually instead of using your script? It sounds more like a permissions issue and not so much AutoIT related.

Share this post


Link to post
Share on other sites

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.

Share this post


Link to post
Share on other sites

if you are in a network with domain you should use this sintax for the username:

-u domainname\username -p password


small minds discuss people average minds discuss events great minds discuss ideas.... and use AutoIt....

Share this post


Link to post
Share on other sites

#5 ·  Posted (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 by compyutech

Share this post


Link to post
Share on other sites

.. ?? .. sorry if some questions are obvious, but :huh2:

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


small minds discuss people average minds discuss events great minds discuss ideas.... and use AutoIt....

Share this post


Link to post
Share on other sites

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 account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0