Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion Mysterious-MessyCode.ps1
Original file line number Diff line number Diff line change
@@ -1 +1,4 @@
$Uninstallers = Get-ChildItem HKLM:\Software\Microsoft\Windows\CurrentVersion\Uninstall\*;($Uninstallers|% {$a=$_;Get-ItemProperty -name UninstallString -Path "$($a.name.replace('HKEY_LOCAL_MACHINE','HKLM:'))" -ErrorAction SilentlyContinue|? {(Get-ItemProperty -name DisplayName -Path $a.name.replace('HKEY_LOCAL_MACHINE','HKLM:')).DisplayName -like '*Carbon*'}}).UninstallString
$Appname = Read-Host "Search for Installed App"
$Uninstallers = Get-ChildItem HKLM:\Software\Microsoft\Windows\CurrentVersion\Uninstall\*,HKLM:\Software\WoW6432Node\Microsoft\Windows\CurrentVersion\Uninstall\*;
($Uninstallers|% {$a=$_;
Get-ItemProperty -name UninstallString -Path "$($a.name.replace('HKEY_LOCAL_MACHINE','HKLM:'))" -ErrorAction SilentlyContinue|? {(Get-ItemProperty -name DisplayName -ErrorAction SilentlyContinue -Path $a.name.replace('HKEY_LOCAL_MACHINE','HKLM:')).DisplayName -like "*$Appname*"}}).UninstallString -replace '"',"" |Invoke-Item