mirror of
https://github.com/zoicware/RemoveWindowsAI.git
synced 2025-12-17 07:06:29 +01:00
add trailing semi colon fix #69
This commit is contained in:
@@ -1636,7 +1636,15 @@ function Hide-AI-Components {
|
|||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
if ($existingSettings -and $existingSettings -notlike '*aicomponents;*') {
|
if ($existingSettings -and $existingSettings -notlike '*aicomponents;*') {
|
||||||
$newval = $existingSettings + 'aicomponents;'
|
|
||||||
|
if (!($existingSettings.endswith(';'))) {
|
||||||
|
#doesnt have trailing ; so need to add it
|
||||||
|
$newval = $existingSettings + ';aicomponents;'
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
$newval = $existingSettings + 'aicomponents;'
|
||||||
|
}
|
||||||
|
|
||||||
Reg.exe add 'HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\Explorer' /v 'SettingsPageVisibility' /t REG_SZ /d $newval /f >$null
|
Reg.exe add 'HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\Explorer' /v 'SettingsPageVisibility' /t REG_SZ /d $newval /f >$null
|
||||||
}
|
}
|
||||||
elseif ($existingSettings -eq $null) {
|
elseif ($existingSettings -eq $null) {
|
||||||
|
|||||||
Reference in New Issue
Block a user