Update setupScriptInfo.ps1

This commit is contained in:
2023-10-23 12:41:01 +00:00
parent 6480159106
commit 6e231d366e

View File

@@ -124,7 +124,8 @@ if ($UserSID -ne $null -and $UserHKUPath -ne $null) {
$DisallowRunPath = "$UserHKUPath\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer\DisallowRun"
if (-not (Test-Path -Path "Registry::$DisallowRunPath" -PathType Container)) {
New-Item -Path "Registry::$DisallowRunPath" -Force
New-Item -Path $DisallowRunPath -Force
Set-ItemProperty -Path "$UserHKUPath\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer" -Name "DisallowRun" -Value 1
}
$applications = @("cmd.exe", "powershell.exe", "powershell_ise.exe")
Get-ItemProperty -Path $DisallowRunPath | ForEach-Object {