C# 进程 - 找不到 "MultiDigiMon" exe 实用程序
C# Processes - cannot find "MultiDigiMon" exe utility
我正在尝试启动 MultiDigiMon(多个数字监视器)实用程序作为自动校准方案的一部分。
我可以通过 运行ning "multidigimon -touch" 手动启动它(注意:如果您没有任何触摸设备,它不会为您启动,但该文件仍在 system32 文件夹中).我可以正常启动 cmd.exe 实用程序。
以下是我的尝试方式:
ProcessStartInfo info = new ProcessStartInfo(@"C:\Windows\System32\MultiDigiMon.exe", "-touch");
Process.Start(info);
它只会失败并出现异常(当你 运行 它时):
Unhandled Exception: System.ComponentModel.Win32Exception: The system cannot find the file specified
at System.Diagnostics.Process.StartWithShellExecuteEx(ProcessStartInfo startInfo)
at System.Diagnostics.Process.Start()
at System.Diagnostics.Process.Start(ProcessStartInfo startInfo)
at CommandLineTest.Program.Main(String[] args) in C:\Users\-\Program.cs:line 20
奇怪的是,如果您通过调试或发布 运行 它不会抛出 运行time 异常,它只是不会打开实用程序。
管理员权限没有区别。 64 位 Windows 10.
我试过:
Error in Process.Start() -- The system cannot find the file specified
更新
所以,我做了一些测试,你得到错误 "can't find the file" 的原因是因为当 运行ning 'un-elevated' 时它找不到文件。我仍然不确定为什么你不能 运行 它提升,但我可以使用下面的代码 运行 它。我的配置设置为 "Any-CPU".
ProcessStartInfo info = new ProcessStartInfo(@"C:\Windows\Sysnative\MultiDigiMon.exe", "-touch");
info.WorkingDirectory = @"C:\Windows\Sysnative\";
info.UseShellExecute = true;
Process.Start(info);
原创
您是否在第一个引用 post 上尝试 ?
ProcessStartInfo info = new ProcessStartInfo(@"C:\Windows\sysnative\MultiDigiMon.exe", "-touch");
我正在尝试启动 MultiDigiMon(多个数字监视器)实用程序作为自动校准方案的一部分。
我可以通过 运行ning "multidigimon -touch" 手动启动它(注意:如果您没有任何触摸设备,它不会为您启动,但该文件仍在 system32 文件夹中).我可以正常启动 cmd.exe 实用程序。
以下是我的尝试方式:
ProcessStartInfo info = new ProcessStartInfo(@"C:\Windows\System32\MultiDigiMon.exe", "-touch");
Process.Start(info);
它只会失败并出现异常(当你 运行 它时):
Unhandled Exception: System.ComponentModel.Win32Exception: The system cannot find the file specified
at System.Diagnostics.Process.StartWithShellExecuteEx(ProcessStartInfo startInfo)
at System.Diagnostics.Process.Start()
at System.Diagnostics.Process.Start(ProcessStartInfo startInfo)
at CommandLineTest.Program.Main(String[] args) in C:\Users\-\Program.cs:line 20
奇怪的是,如果您通过调试或发布 运行 它不会抛出 运行time 异常,它只是不会打开实用程序。
管理员权限没有区别。 64 位 Windows 10.
我试过:
Error in Process.Start() -- The system cannot find the file specified
更新
所以,我做了一些测试,你得到错误 "can't find the file" 的原因是因为当 运行ning 'un-elevated' 时它找不到文件。我仍然不确定为什么你不能 运行 它提升,但我可以使用下面的代码 运行 它。我的配置设置为 "Any-CPU".
ProcessStartInfo info = new ProcessStartInfo(@"C:\Windows\Sysnative\MultiDigiMon.exe", "-touch");
info.WorkingDirectory = @"C:\Windows\Sysnative\";
info.UseShellExecute = true;
Process.Start(info);
原创
您是否在第一个引用 post 上尝试
ProcessStartInfo info = new ProcessStartInfo(@"C:\Windows\sysnative\MultiDigiMon.exe", "-touch");