mirror of
https://github.com/zoicware/RemoveWindowsAI.git
synced 2026-02-27 15:46:50 +01:00
prevent #150
This commit is contained in:
@@ -475,6 +475,10 @@ function Set-UwpAppRegistryEntry {
|
|||||||
$RegContent | Out-File -FilePath $SettingRegFilePath
|
$RegContent | Out-File -FilePath $SettingRegFilePath
|
||||||
|
|
||||||
reg.exe UNLOAD $AppSettingsRegPath 2>&1 | Out-Null
|
reg.exe UNLOAD $AppSettingsRegPath 2>&1 | Out-Null
|
||||||
|
#search host likes to come back and sometimes prevents the dat file from being loaded
|
||||||
|
if (Get-Process -Name SearchHost -ErrorAction SilentlyContinue) {
|
||||||
|
Stop-Process -Name @('SearchHost', 'AppActions') -Force -ErrorAction SilentlyContinue
|
||||||
|
}
|
||||||
reg.exe LOAD $AppSettingsRegPath $FilePath | Out-Null
|
reg.exe LOAD $AppSettingsRegPath $FilePath | Out-Null
|
||||||
reg.exe IMPORT $SettingRegFilePath 2>&1 | Out-Null
|
reg.exe IMPORT $SettingRegFilePath 2>&1 | Out-Null
|
||||||
reg.exe UNLOAD $AppSettingsRegPath | Out-Null
|
reg.exe UNLOAD $AppSettingsRegPath | Out-Null
|
||||||
@@ -1040,11 +1044,7 @@ Windows Registry Editor Version 5.00
|
|||||||
Value = @('1', '0')[$revert] # 1 = disable 0 = enable
|
Value = @('1', '0')[$revert] # 1 = disable 0 = enable
|
||||||
Type = '5f5e10b'
|
Type = '5f5e10b'
|
||||||
}
|
}
|
||||||
#search host likes to come back and sometimes prevents the dat file from being loaded
|
|
||||||
if (Get-Process -Name SearchHost -ErrorAction SilentlyContinue) {
|
|
||||||
Stop-Process -Name @('SearchHost', 'AppActions') -Force -ErrorAction SilentlyContinue
|
|
||||||
}
|
|
||||||
|
|
||||||
$setting | Set-UwpAppRegistryEntry -FilePath $settingsDat
|
$setting | Set-UwpAppRegistryEntry -FilePath $settingsDat
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user