views:

1088

answers:

2

Hi all.

I need to start a document on a remote computer instead of an executable file, using PSExec.

I tried to provide the file name of a jpg file to psexec associated with the -c command to copy the file, but the message returned for documents (and not executables) is always "The system cannot find the file specified."

Anyone any ideas what the command-line for psexec should be?

+1  A: 

Pick a program on that other machine that can show the JPEG and execute that, passing to it the path and name to the file you want to show.

As you've noticed, file associations doesn't work with remote execution like that, so you need to invoke the correct program instead.

Lasse V. Karlsen
I need the file to be copied to the remote machine. Since psexec copies the executable file instead of my document, how can I do this?
TheAgent
Copy it first, if you have remote execution access you should have write access as well.
Lasse V. Karlsen
+2  A: 

Try to use the command:

cmd.exe /c START c:\path\to\document.jpg

Document must be on the remote computer, so you have to copy it there by other command before calling psexec.

Jiri