如何使用命令行解决"This app can’t open for Built-in Administrator account"?



当我尝试运行一些应用程序时,它们会出现以下错误:"此应用无法为内置管理员帐户打开"。我找到了以下解决方案:http://www.bleepingtech.com/windows-8-fix-this-app-cant-open-for-built-in-administrator-account/这非常有效,但当我使用脚本构建系统时,我确实需要使用命令行命令或Powershell脚本执行上述解决方案中的操作。有人知道我如何使用cmd/Powershell执行上述操作吗?

非常感谢!

如果GPO不是一个可行的选项,您可以尝试以下方法(需要重新启动才能生效):

#Sets User Account Control: Admin Approval Mode for the built-in Administrator account to Enabled
New-ItemProperty -Path HKLM:SOFTWAREMicrosoftWindowsCurrentVersionPoliciesSystem -Name "FilterAdministratorToken" -Value "1" -Force

New-ItemProperty -Path HKLM:SOFTWAREMicrosoftWindowsCurrentVersionPoliciesSystemUIPI -Name "(Default)" -Value "0x00000001(1)" -Force
# Use $env:COMPUTERNAME as value for -ComputerName if you want to restart local workstation
Restart-Computer -ComputerName SomeComputerName -Force

我不确定为什么Tyler的解决方案不起作用,但根据他的回答,我设法找到了以下内容:

reg add HKLMSOFTWAREMicrosoftWindowsCurrentVersionPoliciesSystemUIPI /ve /f /d "0x00000001 (1)"
reg add HKLMSOFTWAREMicrosoftWindowsCurrentVersionPoliciesSystem /v FilterAdministratorToken /t REG_DWORD /d 1 /f

不知何故,这确实解决了的问题

相关内容

最新更新