mirror of
https://github.com/zoicware/RemoveWindowsAI.git
synced 2025-12-16 22:56:29 +01:00
add trailing semi colon fix #69
This commit is contained in:
@@ -1636,7 +1636,15 @@ function Hide-AI-Components {
|
||||
}
|
||||
else {
|
||||
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
|
||||
}
|
||||
elseif ($existingSettings -eq $null) {
|
||||
|
||||
Reference in New Issue
Block a user