[Webinar] Streamline your web hosting managementRegister Today

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1513
  • Last Modified:

running program remotely using psexee is not working well

Hi Experts

I want to run java program on remote machine. for example I want to run the notepad
run the notepad.exe.
I write this command

C:\>psexec \\leonardo -d -s notepad.exe

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


notepad.exe started on leonardo with process ID 624.

C:\>


in the remote computer, there is now notepad process, but I can't  see it on the screen

when I add the -i parameter
I get this error

C:\>psexec \\leonardo -d -i notepad.exe

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


PsExec could not start notepad.exe on leonardo:
No process is on the other end of the pipe.

C:\>

How can I solve it ?

Thanks



0
aquasw
Asked:
aquasw
1 Solution
 
johnb6767Commented:
Dont think you can use the -d and the -i together.......

psexec /?

Note the -d switch description......

" Don't wait for process to terminate (non-interactive)."

0
 
aquaswAuthor Commented:
I don't use them together.
in the first example I didn't used it, and also in this example I didn't used it and I still get errors ...


C:\>psexec \\leonardo -i -s notepad.exe

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


PsExec could not start notepad.exe on leonardo:
No process is on the other end of the pipe.

C:\>
0
 
Brian PringleSystems Analyst II, SCM, ERPCommented:
You need to use -i to make it "interactive", which means that it will be visible to the user on the desktop. You need to use the -d switch or else your COMMAND windows session will hang until the user on the other computer ends that process.  

We used to use this program to remotely run programs on other computers in our office, such as starting installations of programs remotely.  We encountered some problems using it with Vista where you had to specify the user to run the program, otherwise the UAC would prevent it from running.  Try the following.

psexec \\leonardo -i -d -u USERNAME notepad.exe

Replace USERNAME with the actual username of an administrative account.
0
Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

 
aquaswAuthor Commented:
Hi

thanks for your answer

that's what I get

C:\>psexec \\leonardo -i -d -u USERNAME notepad.exe

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


PsExec could not start notepad.exe on leonardo:
No process is on the other end of the pipe.

C:\>

I found something interesting ...
I restart the remoted computer, and I didn't conected to it using my remote desktop manager
I called to psexec
C:\>psexec \\leonardo -i -d -u USERNAME notepad.exe

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

notepad.exe started on leonardo with process ID 1232.


and it worked.
when I loged  in using Remote Desktop Manager, the psexec didn't worked. it seems that it's something in the settings of the program
does any know what is it ? and how to fix it ?
I tried with console and without constole ... and it didn't worked.

Thanks
0
 
Adam LeinssCommented:
I would try seeing if there is an outdated copy of psexecsvc.exe on the target PC and then remove it.  I was running 1.94 version of pstools and was getting your first result (task listed in taskmgr, but nothing on the desktop).  I then upgraded to 1.97 and got your second result (no pipe).  As soon as I rebooted the target PC and tried your last command again, it worked.
0
 
Adam LeinssCommented:
If you are using RDP, you need to specify the session id.
I did a mstsc /console to connect to session 0 on the target PC, then this and it worked:
psexec -s \\computername -d -i 0 notepad.exe

0
 
aquaswAuthor Commented:
Hi, thanks

There is no psexecsvc.exe file and I am using psexec version 1.97
and I still get the same error message ... still not working
0
 
aquaswAuthor Commented:
thanks aleinss :)
your answer was really helpful :)
0
 
Adam LeinssCommented:
Really can't offer anything else myself.  I just tried mstsc without /console and it looks like session 0 is still used and it still works fine.  I would perhaps try with a different PC.
0

Featured Post

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now