C#调用SFC引发"Windows 资源保护无法启动修复服务"问题解决 |
您所在的位置:网站首页 › 系统资源保护无法启动修复服务怎么解决 › C#调用SFC引发"Windows 资源保护无法启动修复服务"问题解决 |
C#调用SFC.exe ProcessStartInfo startInfo = new ProcessStartInfo("cmd", "/K sfc.exe /scannow"); startInfo.UseShellExecute = false; startInfo.Verb = "runas"; Process.Start(startInfo);运行结果: 为了使用 sfc 工具,你必须作为管理员运行控制台会话。使用管理员权限打开VS,再次运行,运行结果: Windows 资源保护无法启动修复服务。启动其他软件是可以的,比如ping.exe等,google也很少信息,在犄角旮旯看到这个帖子:http://www.cplusplus.com/forum/general/81883/ 提问者自己解决了问题 I found the answer myself: I created a project that compiled by 32bit compiler but my windows7 platform was 64bit and this did not work. After that, I test this project in windows7 32bit and was OK. and I created project with 64bit compiler in windows7 64bit and that was OK too.有道理 于是编译的时候选择x64作为目标平台,再次运行: 开始系统扫描。此过程将需要一些时间。 开始系统扫描的验证阶段。 验证 2% 已完成。 |
今日新闻 |
点击排行 |
|
推荐新闻 |
图片新闻 |
|
专题文章 |
CopyRight 2018-2019 实验室设备网 版权所有 win10的实时保护怎么永久关闭 |