【问题标题】:How to invoke an exe located remotely on system如何调用位于系统远程的exe
【发布时间】:2018-06-06 09:35:24
【问题描述】:

我使用了链接Execute exe on remote machine上发布的代码 并更改了记事本位置就行 info.Arguments = @"\\" + serverName + @" -i C:\WINDOWS\System32\notepad.exe"; ,但仍然会抛出类似的错误 “系统找不到指定的文件”,知道为什么会导致此错误。我的目标系统是 windows 2008 R2 服务器

【问题讨论】:

  • 远程系统上是否安装了 PsExec?
  • 您不需要该代码来远程运行程序。 Powershell 中的一个简单的Enter-PSSession servername 足以启动一个新会话,而无需安装psexec 或其他任何东西。您也可以非常轻松地在代码中创建远程 Powershell 管道
  • @Panagiotis Kanavos 怎么办??
  • @500 - 内部服务器错误如何知道 psexec 安装在远程服务器上
  • 好吧,如果你安装了它,你就会知道它就在那里......

标签: c# .net .net-4.5


【解决方案1】:

“C:\”中有两个notepad.exe

  1. 在“c:\Windows\notepad.exe”等 Windows 目录中
  2. 在 System32 目录中,如“c:\Windows\System32\notepad.exe”

如果您想访问 System32 目录中的 notepad.exe,那么您需要管理员凭据。

建议:使用“c:\Windows\notepad.exe”这个。

【讨论】:

  • 我没有 c:\Windows\notepad.exe
  • 勾选这个“C:\Windows\SysWOW64\notepad.exe”
猜你喜欢
  • 2013-05-20
  • 1970-01-01
  • 1970-01-01
  • 2017-05-13
  • 1970-01-01
  • 2020-11-30
  • 2016-05-05
  • 1970-01-01
  • 2013-05-09
相关资源
最近更新 更多