Created
October 26, 2017 18:43
-
-
Save rismoney/f5061f49c73a901b0f509a213b06b10a to your computer and use it in GitHub Desktop.
This file contains 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
$uninstall = gci "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall" | foreach { gp $_.PSPath } | ? { $_ -match "MyAppAsItAppearsinAddRemovePrograms" } | select UninstallString | |
$uninstall = $uninstall.UninstallString -Replace "msiexec.exe","" -Replace "/I","" -Replace "/X","" | |
$uninstall = $uninstall.Trim() | |
start-process "msiexec.exe" -arg "/X $uninstall /qb" -Wait |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment