From 9f95ae99eddc8ab67732f3880abbfd174fae2b54 Mon Sep 17 00:00:00 2001 From: zoicware <118035521+zoicware@users.noreply.github.com> Date: Fri, 25 Jul 2025 12:30:13 -0400 Subject: [PATCH] remove photon from apps list to fix #17 --- RemoveWindowsAi.ps1 | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/RemoveWindowsAi.ps1 b/RemoveWindowsAi.ps1 index 58a7d0d..297d5e1 100644 --- a/RemoveWindowsAi.ps1 +++ b/RemoveWindowsAi.ps1 @@ -230,7 +230,7 @@ if (!(test-path $packageRemovalPath)) { #needed for separate powershell sessions $aipackages = @( - 'MicrosoftWindows.Client.Photon' + # 'MicrosoftWindows.Client.Photon' 'MicrosoftWindows.Client.AIX' 'MicrosoftWindows.Client.CoPilot' 'Microsoft.Windows.Ai.Copilot.Provider' @@ -267,7 +267,6 @@ $aipackages = @( $code = @' $aipackages = @( - 'MicrosoftWindows.Client.Photon' 'MicrosoftWindows.Client.AIX' 'MicrosoftWindows.Client.CoPilot' 'Microsoft.Windows.Ai.Copilot.Provider' @@ -447,18 +446,19 @@ foreach ($package in $aipackages) { foreach ($Path in $packagesPath) { #only remove dlls from photon to prevent startmenu from breaking - if ($path -like '*Photon*') { - $command = "`$dlls = (Get-ChildItem -Path $Path -Filter *.dll).FullName; foreach(`$dll in `$dlls){Remove-item ""`$dll"" -force}" - Run-Trusted -command $command -psversion $psversion - Start-Sleep 1 - } - else { - $command = "Remove-item ""$Path"" -force -recurse" - Run-Trusted -command $command -psversion $psversion - Start-Sleep 1 - } + # if ($path -like '*Photon*') { + # $command = "`$dlls = (Get-ChildItem -Path $Path -Filter *.dll).FullName; foreach(`$dll in `$dlls){Remove-item ""`$dll"" -force}" + # Run-Trusted -command $command -psversion $psversion + # Start-Sleep 1 + # } + # else { + $command = "Remove-item ""$Path"" -force -recurse" + Run-Trusted -command $command -psversion $psversion + Start-Sleep 1 + # } } + #remove machine learning dlls $paths = @( "$env:SystemRoot\System32\Windows.AI.MachineLearning.dll"