mirror of
https://github.com/zoicware/RemoveWindowsAI.git
synced 2025-12-17 07:06:29 +01:00
add appx packages installed on all users (used on copilot+ pcs)
This commit is contained in:
@@ -315,6 +315,7 @@ function Disable-Registry-Keys {
|
|||||||
|
|
||||||
#disabling and removing voice access, recently added ai powered
|
#disabling and removing voice access, recently added ai powered
|
||||||
Reg.exe add 'HKCU\Software\Microsoft\VoiceAccess' /v 'RunningState' /t REG_DWORD /d @('0', '1')[$revert] /f
|
Reg.exe add 'HKCU\Software\Microsoft\VoiceAccess' /v 'RunningState' /t REG_DWORD /d @('0', '1')[$revert] /f
|
||||||
|
Reg.exe add 'HKCU\Software\Microsoft\VoiceAccess' /v 'TextCorrection' /t REG_DWORD /d @('1', '2')[$revert] /f
|
||||||
Reg.exe add 'HKCU\Software\Microsoft\Windows NT\CurrentVersion\AccessibilityTemp' /v @('0', '1')[$revert] /t REG_DWORD /d '0' /f
|
Reg.exe add 'HKCU\Software\Microsoft\Windows NT\CurrentVersion\AccessibilityTemp' /v @('0', '1')[$revert] /t REG_DWORD /d '0' /f
|
||||||
$startMenu = "$env:appdata\Microsoft\Windows\Start Menu\Programs\Accessibility"
|
$startMenu = "$env:appdata\Microsoft\Windows\Start Menu\Programs\Accessibility"
|
||||||
$voiceExe = "$env:windir\System32\voiceaccess.exe"
|
$voiceExe = "$env:windir\System32\voiceaccess.exe"
|
||||||
@@ -685,31 +686,36 @@ function Remove-AI-Appx-Packages {
|
|||||||
'MicrosoftWindows.Client.CoreAI'
|
'MicrosoftWindows.Client.CoreAI'
|
||||||
'Microsoft.Edge.GameAssist'
|
'Microsoft.Edge.GameAssist'
|
||||||
#ai component packages installed on copilot+ pcs
|
#ai component packages installed on copilot+ pcs
|
||||||
'WindowsWorkload.Data.Analysis.Stx.1'
|
'MicrosoftWindows.*.Voiess'
|
||||||
'WindowsWorkload.Manager.1'
|
'MicrosoftWindows.*.Speion'
|
||||||
'WindowsWorkload.PSOnnxRuntime.Stx.2.7'
|
'MicrosoftWindows.*.Livtop'
|
||||||
'WindowsWorkload.PSTokenizer.Stx.2.7'
|
'MicrosoftWindows.*.InpApp'
|
||||||
'WindowsWorkload.QueryBlockList.1'
|
'MicrosoftWindows.*.Filons'
|
||||||
'WindowsWorkload.QueryProcessor.Data.1'
|
'WindowsWorkload.Data.Analysis.Stx.*'
|
||||||
'WindowsWorkload.QueryProcessor.Stx.1'
|
'WindowsWorkload.Manager.*'
|
||||||
'WindowsWorkload.SemanticText.Data.1'
|
'WindowsWorkload.PSOnnxRuntime.Stx.*'
|
||||||
'WindowsWorkload.SemanticText.Stx.1'
|
'WindowsWorkload.PSTokenizer.Stx.*'
|
||||||
'WindowsWorkload.Data.ContentExtraction.Stx.1'
|
'WindowsWorkload.QueryBlockList.*'
|
||||||
'WindowsWorkload.ScrRegDetection.Data.1'
|
'WindowsWorkload.QueryProcessor.Data.*'
|
||||||
'WindowsWorkload.ScrRegDetection.Stx.1'
|
'WindowsWorkload.QueryProcessor.Stx.*'
|
||||||
'WindowsWorkload.TextRecognition.Stx.1'
|
'WindowsWorkload.SemanticText.Data.*'
|
||||||
'WindowsWorkload.Data.ImageSearch.Stx.1'
|
'WindowsWorkload.SemanticText.Stx.*'
|
||||||
'WindowsWorkload.ImageContentModeration.1'
|
'WindowsWorkload.Data.ContentExtraction.Stx.*'
|
||||||
'WindowsWorkload.ImageContentModeration.Data.1'
|
'WindowsWorkload.ScrRegDetection.Data.*'
|
||||||
'WindowsWorkload.ImageSearch.Data.3'
|
'WindowsWorkload.ScrRegDetection.Stx.*'
|
||||||
'WindowsWorkload.ImageSearch.Stx.2'
|
'WindowsWorkload.TextRecognition.Stx.*'
|
||||||
'WindowsWorkload.ImageSearch.Stx.3'
|
'WindowsWorkload.Data.ImageSearch.Stx.*'
|
||||||
'WindowsWorkload.ImageTextSearch.Data.3'
|
'WindowsWorkload.ImageContentModeration.*'
|
||||||
'WindowsWorkload.PSOnnxRuntime.Stx.3.2'
|
'WindowsWorkload.ImageContentModeration.Data.*'
|
||||||
'WindowsWorkload.PSTokenizerShared.Data.3.2'
|
'WindowsWorkload.ImageSearch.Data.*'
|
||||||
'WindowsWorkload.PSTokenizerShared.Stx.3.2'
|
'WindowsWorkload.ImageSearch.Stx.*'
|
||||||
'WindowsWorkload.ImageTextSearch.Stx.2'
|
'WindowsWorkload.ImageSearch.Stx.*'
|
||||||
'WindowsWorkload.ImageTextSearch.Stx.3'
|
'WindowsWorkload.ImageTextSearch.Data.*'
|
||||||
|
'WindowsWorkload.PSOnnxRuntime.Stx.*'
|
||||||
|
'WindowsWorkload.PSTokenizerShared.Data.*'
|
||||||
|
'WindowsWorkload.PSTokenizerShared.Stx.*'
|
||||||
|
'WindowsWorkload.ImageTextSearch.Stx.*'
|
||||||
|
'WindowsWorkload.ImageTextSearch.Stx.*'
|
||||||
)
|
)
|
||||||
|
|
||||||
if ($backup) {
|
if ($backup) {
|
||||||
@@ -738,31 +744,36 @@ $aipackages = @(
|
|||||||
'Microsoft.MicrosoftOfficeHub'
|
'Microsoft.MicrosoftOfficeHub'
|
||||||
'MicrosoftWindows.Client.CoreAI'
|
'MicrosoftWindows.Client.CoreAI'
|
||||||
'Microsoft.Edge.GameAssist'
|
'Microsoft.Edge.GameAssist'
|
||||||
'WindowsWorkload.Data.Analysis.Stx.1'
|
'MicrosoftWindows.*.Voiess'
|
||||||
'WindowsWorkload.Manager.1'
|
'MicrosoftWindows.*.Speion'
|
||||||
'WindowsWorkload.PSOnnxRuntime.Stx.2.7'
|
'MicrosoftWindows.*.Livtop'
|
||||||
'WindowsWorkload.PSTokenizer.Stx.2.7'
|
'MicrosoftWindows.*.InpApp'
|
||||||
'WindowsWorkload.QueryBlockList.1'
|
'MicrosoftWindows.*.Filons'
|
||||||
'WindowsWorkload.QueryProcessor.Data.1'
|
'WindowsWorkload.Data.Analysis.Stx.*'
|
||||||
'WindowsWorkload.QueryProcessor.Stx.1'
|
'WindowsWorkload.Manager.*'
|
||||||
'WindowsWorkload.SemanticText.Data.1'
|
'WindowsWorkload.PSOnnxRuntime.Stx.*'
|
||||||
'WindowsWorkload.SemanticText.Stx.1'
|
'WindowsWorkload.PSTokenizer.Stx.*'
|
||||||
'WindowsWorkload.Data.ContentExtraction.Stx.1'
|
'WindowsWorkload.QueryBlockList.*'
|
||||||
'WindowsWorkload.ScrRegDetection.Data.1'
|
'WindowsWorkload.QueryProcessor.Data.*'
|
||||||
'WindowsWorkload.ScrRegDetection.Stx.1'
|
'WindowsWorkload.QueryProcessor.Stx.*'
|
||||||
'WindowsWorkload.TextRecognition.Stx.1'
|
'WindowsWorkload.SemanticText.Data.*'
|
||||||
'WindowsWorkload.Data.ImageSearch.Stx.1'
|
'WindowsWorkload.SemanticText.Stx.*'
|
||||||
'WindowsWorkload.ImageContentModeration.1'
|
'WindowsWorkload.Data.ContentExtraction.Stx.*'
|
||||||
'WindowsWorkload.ImageContentModeration.Data.1'
|
'WindowsWorkload.ScrRegDetection.Data.*'
|
||||||
'WindowsWorkload.ImageSearch.Data.3'
|
'WindowsWorkload.ScrRegDetection.Stx.*'
|
||||||
'WindowsWorkload.ImageSearch.Stx.2'
|
'WindowsWorkload.TextRecognition.Stx.*'
|
||||||
'WindowsWorkload.ImageSearch.Stx.3'
|
'WindowsWorkload.Data.ImageSearch.Stx.*'
|
||||||
'WindowsWorkload.ImageTextSearch.Data.3'
|
'WindowsWorkload.ImageContentModeration.*'
|
||||||
'WindowsWorkload.PSOnnxRuntime.Stx.3.2'
|
'WindowsWorkload.ImageContentModeration.Data.*'
|
||||||
'WindowsWorkload.PSTokenizerShared.Data.3.2'
|
'WindowsWorkload.ImageSearch.Data.*'
|
||||||
'WindowsWorkload.PSTokenizerShared.Stx.3.2'
|
'WindowsWorkload.ImageSearch.Stx.*'
|
||||||
'WindowsWorkload.ImageTextSearch.Stx.2'
|
'WindowsWorkload.ImageSearch.Stx.*'
|
||||||
'WindowsWorkload.ImageTextSearch.Stx.3'
|
'WindowsWorkload.ImageTextSearch.Data.*'
|
||||||
|
'WindowsWorkload.PSOnnxRuntime.Stx.*'
|
||||||
|
'WindowsWorkload.PSTokenizerShared.Data.*'
|
||||||
|
'WindowsWorkload.PSTokenizerShared.Stx.*'
|
||||||
|
'WindowsWorkload.ImageTextSearch.Stx.*'
|
||||||
|
'WindowsWorkload.ImageTextSearch.Stx.*'
|
||||||
)
|
)
|
||||||
|
|
||||||
$provisioned = get-appxprovisionedpackage -online
|
$provisioned = get-appxprovisionedpackage -online
|
||||||
@@ -990,31 +1001,12 @@ function Remove-AI-Files {
|
|||||||
'MicrosoftWindows.Client.CoreAI'
|
'MicrosoftWindows.Client.CoreAI'
|
||||||
'Microsoft.Edge.GameAssist'
|
'Microsoft.Edge.GameAssist'
|
||||||
#ai component packages installed on copilot+ pcs
|
#ai component packages installed on copilot+ pcs
|
||||||
'WindowsWorkload.Data.Analysis.Stx.1'
|
'WindowsWorkload'
|
||||||
'WindowsWorkload.Manager.1'
|
'Voiess'
|
||||||
'WindowsWorkload.PSOnnxRuntime.Stx.2.7'
|
'Speion'
|
||||||
'WindowsWorkload.PSTokenizer.Stx.2.7'
|
'Livtop'
|
||||||
'WindowsWorkload.QueryBlockList.1'
|
'InpApp'
|
||||||
'WindowsWorkload.QueryProcessor.Data.1'
|
'Filons'
|
||||||
'WindowsWorkload.QueryProcessor.Stx.1'
|
|
||||||
'WindowsWorkload.SemanticText.Data.1'
|
|
||||||
'WindowsWorkload.SemanticText.Stx.1'
|
|
||||||
'WindowsWorkload.Data.ContentExtraction.Stx.1'
|
|
||||||
'WindowsWorkload.ScrRegDetection.Data.1'
|
|
||||||
'WindowsWorkload.ScrRegDetection.Stx.1'
|
|
||||||
'WindowsWorkload.TextRecognition.Stx.1'
|
|
||||||
'WindowsWorkload.Data.ImageSearch.Stx.1'
|
|
||||||
'WindowsWorkload.ImageContentModeration.1'
|
|
||||||
'WindowsWorkload.ImageContentModeration.Data.1'
|
|
||||||
'WindowsWorkload.ImageSearch.Data.3'
|
|
||||||
'WindowsWorkload.ImageSearch.Stx.2'
|
|
||||||
'WindowsWorkload.ImageSearch.Stx.3'
|
|
||||||
'WindowsWorkload.ImageTextSearch.Data.3'
|
|
||||||
'WindowsWorkload.PSOnnxRuntime.Stx.3.2'
|
|
||||||
'WindowsWorkload.PSTokenizerShared.Data.3.2'
|
|
||||||
'WindowsWorkload.PSTokenizerShared.Stx.3.2'
|
|
||||||
'WindowsWorkload.ImageTextSearch.Stx.2'
|
|
||||||
'WindowsWorkload.ImageTextSearch.Stx.3'
|
|
||||||
)
|
)
|
||||||
|
|
||||||
Write-Status -msg 'Removing Appx Package Files...'
|
Write-Status -msg 'Removing Appx Package Files...'
|
||||||
@@ -1036,12 +1028,18 @@ function Remove-AI-Files {
|
|||||||
if (!(Test-Path $appsPath5)) {
|
if (!(Test-Path $appsPath5)) {
|
||||||
$appsPath5 = "$env:windir\System32\CatRoot"
|
$appsPath5 = "$env:windir\System32\CatRoot"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$appsPath6 = "$env:SystemRoot\SystemApps\SxS"
|
||||||
|
if (!(Test-Path $appsPath6)) {
|
||||||
|
$appsPath6 = "$env:windir\SystemApps\SxS"
|
||||||
|
}
|
||||||
$pathsSystemApps = (Get-ChildItem -Path $appsPath -Directory -Force).FullName
|
$pathsSystemApps = (Get-ChildItem -Path $appsPath -Directory -Force).FullName
|
||||||
$pathsWindowsApps = (Get-ChildItem -Path $appsPath2 -Directory -Force).FullName
|
$pathsWindowsApps = (Get-ChildItem -Path $appsPath2 -Directory -Force).FullName
|
||||||
$pathsAppRepo = (Get-ChildItem -Path $appsPath3 -Directory -Force -Recurse).FullName
|
$pathsAppRepo = (Get-ChildItem -Path $appsPath3 -Directory -Force -Recurse).FullName
|
||||||
$pathsServicing = (Get-ChildItem -Path $appsPath4 -Directory -Force -Recurse).FullName
|
$pathsServicing = (Get-ChildItem -Path $appsPath4 -Directory -Force -Recurse).FullName
|
||||||
$pathsCatRoot = (Get-ChildItem -Path $appsPath5 -Directory -Force -Recurse).FullName
|
$pathsCatRoot = (Get-ChildItem -Path $appsPath5 -Directory -Force -Recurse).FullName
|
||||||
|
$pathsSXS = (Get-ChildItem -Path $appsPath6 -Directory -Force).FullName
|
||||||
|
|
||||||
$packagesPath = @()
|
$packagesPath = @()
|
||||||
#get full path
|
#get full path
|
||||||
foreach ($package in $aipackages) {
|
foreach ($package in $aipackages) {
|
||||||
@@ -1063,6 +1061,12 @@ function Remove-AI-Files {
|
|||||||
$packagesPath += $path
|
$packagesPath += $path
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
foreach ($path in $pathsSXS) {
|
||||||
|
if ($path -like "*$package*") {
|
||||||
|
$packagesPath += $path
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user