Link to home
Start Free TrialLog in
Avatar of cawasaki
cawasaki

asked on

execute exe file in remote server

Hi,

i need to execute .exe file remotely to many 2008 server .
i have from txt file with a list of server like this:

server1
server2
server3
....

i have use psexec but not work!

i have use this command remotely:

psexec.exe -d @list.txt c:\file.exe

but not work

thanks for help
Avatar of kaufmed
kaufmed
Flag of United States of America image

Does the account you are running the psexec command have an account and permissions on those remote servers? If not, you will need to pass a username a password for the remote servers as well.
Avatar of DVation191
DVation191

Try this instead:
psexec.exe \\computername –i –u DOMAIN\username –p Password –d @list.txt c:\file.exe

Open in new window

ASKER CERTIFIED SOLUTION
Avatar of DVation191
DVation191

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of cawasaki

ASKER

Ok its all server is in domain and my profile is admin domain.

the problem is the exe file i need to execute must use same option like this:

c:\file.exe -i -o....

not sure it work?
You can add those options after file.exe and they will be passed through to the other machine as you put them.

Steve
Being 2008 are we hitting some UAC error or similar perhaps?  Does anything get to the remote server, does your end give an error, if so what?
Here the error: and yes all my server is 2008

C:\install>psexec.exe @list.txt -i -d "c:\file.exe -s ip -p 444 -c 444"

PsExec v1.98 - Execute processes remotely
Copyright (C) 2001-2010 Mark Russinovich
Sysinternals - www.sysinternals.com

\\SERVER1

PsExec could not start ?i on SERVER1:
The system cannot find the file specified.
How about trying the command without the @file and try a single machine first - one that you have verified that C:\file.exe actually exists.
This command work fine but i have 10% of server who the psexec work but the exe not executed!
psexec.exe @list.txt c:\file.exe -s ip -p 444 -c 444
Add -f to your command line
What is -f ?
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Glad I could help