【发布时间】:2019-11-08 03:32:47
【问题描述】:
Windows10 IOT 企业版具有保护驱动器写入访问的功能。此功能称为 UWF“统一写入过滤器”。我启用此功能并保护 C 驱动器上的写访问。现在我正在寻找一种通过我的 c# 代码禁用它的功能。禁用它的 Cmd 命令是“uwfmgr 过滤器禁用”。我实现了代码(如下)来执行这个命令,但它不起作用
System.Diagnostics.Process process = new System.Diagnostics.Process();
System.Diagnostics.ProcessStartInfo startInfo = new System.Diagnostics.ProcessStartInfo();
startInfo.WindowStyle = System.Diagnostics.ProcessWindowStyle.Hidden;
startInfo.FileName = "cmd.exe";
startInfo.Arguments = "/C uwfmgr filter disable";
startInfo.UserName = "Administrator";
startInfo.Password = class1.ConvertToSecureString("SRPedm");
process.StartInfo = startInfo;
process.Start();
Process.Start("shutdown","/r /t 0");
代码执行没有给出任何错误,但命令没有执行。
【问题讨论】:
-
我知道我的回答对你来说可能已经过时了。我用 C# 编写了一个小程序,它可能满足您的要求。 github.com/cregx/uwf-dashboard
标签: c# cmd windows-10-iot-enterprise