peter
peter

Reputation: 8682

How to invoke an exe located remotely on system

I have used the code posted on link Execute exe on remote machine and changed notepad location on the line info.Arguments = @"\\" + serverName + @" -i C:\WINDOWS\System32\notepad.exe"; ,but still throws error like "The system cannot find the file specified" ,any idea why this error is causing.My destination system is windows 2008 R2 server

Upvotes: 0

Views: 117

Answers (1)

Niteen
Niteen

Reputation: 151

There are two notepad.exe available in "C:\"

  1. In Windows directory like "c:\Windows\notepad.exe"
  2. In System32 directory like "c:\Windows\System32\notepad.exe"

If you want to access notepad.exe in the System32 directory then you want administrator credentials.

Suggestion: use "c:\Windows\notepad.exe" this one.

Upvotes: 1

Related Questions