【发布时间】:2020-07-15 10:33:11
【问题描述】:
我必须部署 UWP 应用程序说示例“OfflineFacialLogin”,我可以像这样从命令提示符手动启动“OfflineFacialLogin”
“C:\Windows\System32>OfflineFacialLogin”
同样的代码可以在下面的代码调试环境中工作。
var proc = new ProcessStartInfo();
string yourCommand;
yourCommand = OfflineFacialLogin.exe”;
proc.UseShellExecute = true;
proc.WorkingDirectory = @”C:\Windows\System32″;
proc.FileName = @”C:\Windows\System32\cmd.exe”;
proc.Arguments = “/c ” + yourCommand;
proc.WindowStyle = ProcessWindowStyle.Normal;process.Start(proc);
但是在将此代码 dll 放入 system32 或 syswow 文件夹并重新启动机器后,我没有 UWP 应用程序 OfflineFacialLogin 没有启动,可能是什么原因
我想 OfflineFacialLogin 将在 windows 登录期间启动,所以我在成功登录时编写了上面的代码 sn -p 然后启动 UWP 应用程序
【问题讨论】:
标签: c# uwp processstartinfo