Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I would like to start an application remotely. I am using the following PsExec command:

PsExec \\computerOne -u Domain\User1 -p 123456 -x "C:\Windows\System32\calc.exe"

I tried to use -i so that the program interacts with the desktop:

PsExec \\computerOne -u Domain\User1 -i 123456 -x "C:\Windows\System32\calc.exe"

but that does not work. The error from the second example is:

calc.exe exited on computerOne with error code -1073741502"

If I omit the specification and just write the path of the exe, the process is listed in the taskmanager but I can not see any UI. Do I have to change any settings on my Desktop on which I want to start the program?

share|improve this question
add comment

1 Answer

up vote 4 down vote accepted

What you are seeing is likely to be an effect of Session 0 isolation - psexec installs and starts a new service on the remote machine, but the default session it is starting your process in is 0, and thus unavailable to the currently logged on user (at least on from Windows Vista / Server 2008). You need to specify the session number after the -i parameter. You can query the currently logged on users (and their session numbers) using the quser /SERVER:computerOne command beforehand.

For quick&dirty testing you can assume that the session ID of the first interactively logged-on user is "1".

share|improve this answer
    
Thank you. It works fine. –  seven-ply Feb 7 '12 at 12:33
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.