Update setupScriptInfo.ps1
This commit is contained in:
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user