Last active
February 8, 2026 11:08
-
-
Save tnhung2011/6e1d40a917c2819654ea16e478ae620e to your computer and use it in GitHub Desktop.
Uninstall FluentFlyout along with its certificate
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <# : | |
| @echo off | |
| setlocal enableextensions | |
| :: net session depends on Server service, so this method is used instead | |
| reg query HKEY_USERS\S-1-5-19\Environment /v TEMP >nul 2>nul || ( | |
| choice /M "Relaunch the script as administrator" | |
| if errorlevel 2 goto :eof | |
| mshta vbscript:Execute("CreateObject(""Shell.Application"").ShellExecute ""%~f0"", """", """", ""runas"", 1:code close"^) | |
| goto :eof | |
| ) | |
| powershell -NoProfile -NoLogo "iex (${%~f0} | out-string)" | |
| pause | |
| goto :eof | |
| #> | |
| $app = Get-AppxPackage unchihugo.FluentFlyout -AllUsers -ErrorAction Stop | |
| if ($app -eq $null) { | |
| [Console]::Error.WriteLine("Package not found: unchihugo.FluentFlyout") | |
| exit 1 | |
| } else { | |
| Write-Output "Found package: unchihugo.FluentFlyout" | |
| } | |
| $loc = $app.InstallLocation | |
| choice /M "Do you want to remove unchihugo.FluentFlyout" | |
| # Selected no or error? | |
| if ($LASTEXITCODE -in 2, 255) { exit 1 } | |
| Write-Output "Stopping FluentFlyout process..." | |
| $process = Get-Process FluentFlyout -ea SilentlyContinue | |
| if ($process -ne $null) { $process | Stop-Process } | |
| Write-Output "Removing package..." | |
| $NoCert = $false | |
| $cert = Join-Path $loc "AppxSignature.p7x" | |
| $thumb = [System.Security.Cryptography.X509Certificates.X509Certificate2]::new($cert).thumbprint | |
| if ($? -eq $false) { | |
| [Console]::Error.WriteLine("Can't find certificate at: $cert") | |
| $NoCert = $true | |
| } | |
| $app | Remove-AppxPackage -AllUsers -ErrorAction Stop | |
| if ($NoCert) { exit } | |
| Write-Output "Removing associated certificate..." | |
| Remove-Item Cert:\LocalMachine\TrustedPeople\$thumb |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment