whoami
whoami

Reputation: 1909

installing programs on remote machines

I want to run an installer on remote computer remotely. This mean I first need to copy it somehwere on that remote machine and then run it using tools like psexec. I am using following command to run the program but is there anyway within psexec to copy the file first and then run it. I will appreciate any suggestions about it?

psexec \\RemoteComputer  -u username -p something -i c:\PAthOnRemoteMachineMachine\SomeInstaller.msi

Upvotes: 0

Views: 272

Answers (2)

Neelabh Mam
Neelabh Mam

Reputation: 310

The path after -csrc is the path of the source file from where paexec would copy the file from, on the source machine. To direct paexec to execute the file off a specific location on the remote machine we'd have additionally specify the "remote launch path" like c:\windows\abc.exe , optionally with arguments (x y and z below) i.e. copy abc.exe from c:\MyLocalDir on the source machine to c:\windows on the remote machine and launch it there (C:\windows on the remote) with x y and z arguments. The "Reached end of command before seeing expected parts" error is because the last part (remote launch specification) is missing.

paexec \\RemoteComputer  -u username -p something -i -c -csrc c:\MyLocalDir\abc.exe c:\windows\abc.exe x y z

Upvotes: 1

Yury R.
Yury R.

Reputation: 220

You could try PAExec. It supports the same syntax, but also has additional features like "upload-and-run"

paexec \\RemoteComputer  -u username -p something -i -c -csrc c:\MyLocalDir\SomeInstaller.msi

Upvotes: 1

Related Questions