Change scripts
This commit is contained in:
@@ -1,7 +1,17 @@
|
||||
# Reg2CI (c) 2022 by Roger Zander
|
||||
try {
|
||||
if(-NOT (Test-Path -LiteralPath "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\CapabilityAccessManager\ConsentStore\location")){ exti 1 };
|
||||
if((Get-ItemPropertyValue -LiteralPath 'HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\CapabilityAccessManager\ConsentStore\location' -Name 'Value' -ea SilentlyContinue) -eq 'Allow') { } else { exit 1 };
|
||||
}
|
||||
catch { exit 1 }
|
||||
exit 0
|
||||
if (-not (Test-Path -LiteralPath "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\CapabilityAccessManager\ConsentStore\location")) {
|
||||
return $false
|
||||
exit 1
|
||||
}
|
||||
if ((Get-ItemPropertyValue -LiteralPath 'HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\CapabilityAccessManager\ConsentStore\location' -Name 'Value' -ea SilentlyContinue) -eq 'Allow') {
|
||||
return $true
|
||||
exit 0
|
||||
} else {
|
||||
return $false
|
||||
exit 1
|
||||
}
|
||||
}
|
||||
catch {
|
||||
return $false
|
||||
exit 1
|
||||
}
|
||||
@@ -1,3 +1,4 @@
|
||||
# Reg2CI (c) 2022 by Roger Zander
|
||||
if((Test-Path -LiteralPath "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\CapabilityAccessManager\ConsentStore\location") -ne $true) { New-Item "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\CapabilityAccessManager\ConsentStore\location" -force -ea SilentlyContinue };
|
||||
New-ItemProperty -LiteralPath 'HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\CapabilityAccessManager\ConsentStore\location' -Name 'Value' -Value 'Allow' -PropertyType String -Force -ea SilentlyContinue;
|
||||
New-ItemProperty -LiteralPath 'HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\CapabilityAccessManager\ConsentStore\location' -Name 'Value' -Value 'Allow' -PropertyType String -Force -ea SilentlyContinue;
|
||||
if((Test-Path -LiteralPath "HKLM:\SYSTEM\CurrentControlSet\Services\tzautoupdate") -ne $true) { New-Item "HKLM:\SYSTEM\CurrentControlSet\Services\tzautoupdate" -force -ea SilentlyContinue };
|
||||
New-ItemProperty -LiteralPath 'HKLM:\SYSTEM\CurrentControlSet\Services\tzautoupdate' -Name 'Start' -Value 3 -PropertyType DWord -Force -ea SilentlyContinue;
|
||||
Reference in New Issue
Block a user