Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

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

psexec \\MyPC -U Administrator -p okmnji C:\Windows\notepad.exe got hang

Hi Experts,

I was able to run this command, without error ..

@ECHO OFF

psexec \\MyPC -U Administrator -p Password cmd.exe /c dir C:\

But not be able to run this one below, it hang, after it have fully accessed into the remote PC (MyPC), would you please point out the errors in that line of code.

Thanks

@ECHO OFF

psexec \\MyPC -U Administrator -p Password C:\Windows\notepad.exe


PAUSE ..
0
cunoc
Asked:
cunoc
  • 3
  • 3
  • 2
5 Solutions
 
torimarCommented:
If you want to start graphical applications via psexec you must do so with the interactive switch "-i". So try the following command line:

psexec \\MyPC -u Administrator -p Password -i C:\Windows\notepad.exe

If you have unsuccessfully tried a psexec command before, the remote computer may still be running a version of the "psexecsvc.exe" among the active processes. This will make the psexec command unavailable. So if you encounter problems/errors, please make sure to either terminate that process (psexecsvc.exe) or reboot the remote client before trying again.
0
 
vikas_madhusudanaCommented:
you can probably use -d option

psexec \\MyPC -U Administrator -p Password -d  C:\Windows\notepad.exe

This will not wait for completion of command something like running it as a process.
0
 
cunocAuthor Commented:
Hi all,
With this command, the notepad is popup on the remote PC, not on the one i am using ... so how can i make it appear on my PC, not on the remote PC.

I also want to thanks Modalot who has removed my password for security reason.

psexec \\MyPC -u Administrator -p Password -i C:\Windows\notepad.exe

/////////////

With this command, I got an error ..

psexec \\MyPC -U Administrator -p Password -d  C:\Windows\notepad.exe

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

C:\Windows\notepad.exe started on XPS-M1710-PC with process ID 2912.
Press any key to continue . . .
0
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
torimarCommented:
psexec is for remote execution on remote systems, that's its sole purpose.
If you want to run Notepad on your local system via a batch file, use the "start" command:

@echo off
start notepad.exe
pause
0
 
cunocAuthor Commented:
Hi torimar:
I want to open a notepad.exe on remote systems is for testing purpose, to make sure the psexec is able to communicate to the remote system from My PC.

So if someone from a remote system want me to help something on the remote system, Am I able to see what I want to see from My PC, or no way !! .

Thanks
0
 
vikas_madhusudanaCommented:
0
 
torimarCommented:
No way.

That is not what psexec is meant for. You cannot see the remote system through it, nor can you make it visualize output from the remote system on your local one.

For purposes like that, you need to use a remote control software with desktop sharing, like Ultra VNC, or PCAnywhere, or Teamviewer or Netmeeting etc.
0
 
cunocAuthor Commented:
Hi all Experts,

Thank you for the advices and your knowledges you guys have provided.

Take care you guys.
 
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

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