Tag: psexec

C#截图winlogon以及用户桌面

我正在使用屏幕共享项目。但我遇到了捕获安全桌面的麻烦。 我已经在这里提出相关问题并得到了答案 请通过以上链接 正如dymanoid所暗示的那样。 我正在使用PsExec exe来捕获安全的桌面/ winlogon桌面,如下所示 / x和/ s开关在SYSTEM帐户和Winlogon桌面下运行该进程。 PsExec / i / h / x / d / s“path_ \ screencapture.exe” 现在screencapture exe在winlogon桌面上作为SYSTEM帐户运行,我能够在用户登录屏幕上看到screencapture exe,但在用户桌面屏幕上看不到。 现在反过来我能够捕获用户登录屏幕而不是用户桌面。 用户桌面给我空/黑屏。 如果我从命令中删除/ x如下所示,我可以得到userdesktop不安全的桌面 PsExec / i / h / d / s“path_ \ screencapture.exe” 我的问题是,有没有办法做到这一点

从代码运行PsExec进程的问题

尝试使用PsExec远程运行.NET命令行工具时,我遇到了一个奇怪的问题。 从命令行运行PsExec时,它运行并完成正常。 从控制台应用程序运行它时(创建一个进程,运行带有必要参数的PsExec.exe) – 它运行正常。 从我们用于运行不同任务的内部自定义工具运行它时,它会超时或无法成功完成。 这是我正在使用的代码: Process p = new Process(); p.StartInfo.FileName = @”C:\PsExec.exe”; p.StartInfo.RedirectStandardOutput = true; p.StartInfo.UseShellExecute = false; p.StartInfo.CreateNoWindow = true; string arg = “-snapshot -display C:\*.msi -s”; p.StartInfo.Arguments = @”\\10.161.203.106 -u user -p pwd -cf C:\FVT.exe ” + arg; Logger.Info(this, “Starting process”); p.Start(); var ended = p.WaitForExit(60 * 1000); if (!ended) […]

如何将参数传递给exe?

我在我的服务器上使用psexec在另一台服务器上运行exe文件。 如何将参数传递给其他exe? 我在我的服务器上运行的exe是psexec,而后者必须运行位于另一个系统上的名为vmtoolsd.exe的exe。 如何将参数传递给vmtoolsd.exe? 另外,我在哪里通过它? 我会将它作为info.Arguments的一部分传递给我吗? 我试过了,但它没有用。 ProcessStartInfo info = new ProcessStartInfo(@”C:\Tools”); info.FileName = @”C:\Tools\psexec.exe”; info.Arguments = @”\\” + serverIP + @”C:\Program Files\VMware\VMwareTools\vmtoolsd.exe”; Process.Start(info); 另外,作为info.Arguments的一部分,我必须在vmtoolsd.exe的路径前加上IP地址,然后是驱动器路径?

在远程计算机上执行exe

我正在尝试在远程计算机上执行notepad.exe,但它现在不能正常工作。 我错过了什么? var ui = new ImpersonateUser(); //the process to restart const string processName = “notepad.exe”; var serverName = “serverName”; try { //Use adbadmin for access ui.Impersonate(_domain, _userName, _pass); //Start the process ProcessStartInfo info = new ProcessStartInfo(“C:\\PsTools”); info.FileName = @”C:\PsTools\psexec.exe”; info.Arguments = @”””\\” + serverName + @”C:\WINDOWS\notepad.exe”””; info.RedirectStandardOutput = true; info.UseShellExecute = false; Process p […]