Update setupScriptInfo.ps1

This commit is contained in:
2023-10-16 10:25:20 +00:00
parent a00a1e17a1
commit 773ada4c25

View File

@@ -110,7 +110,7 @@ if ($UserSID -ne $null -and $UserHKUPath -ne $null) {
$DisallowRunPath = "$UserHKUPath\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer\DisallowRun"
$applications = @("cmd.exe", "powershell.exe", "powershell_ise.exe")
Get-ItemProperty -Path $DisallowRunPath | ForEach-Object {
Remove-ItemProperty -Path $DisallowRunPath -Name $_.PSObject.Properties.Name
Remove-ItemProperty -Path $DisallowRunPath -Name $_.PSObject.Properties.Name -ErrorAction SilentlyContinue
}
foreach ($valueName in $applications) {
New-ItemProperty -Path $DisallowRunPath -Name $valueName -Value $valueName -PropertyType String