Created
December 30, 2010 12:11
-
-
Save BrunoCaimar/759716 to your computer and use it in GitHub Desktop.
Uninstall Gisconnex
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
#$a = "Gisconnex WM 1.0.2", "Gisconnex PD 1.0.11", "Gisconnex ADM 1.0.11" | |
$a = "Gisconnex WM 2.0.0", "Gisconnex PD 2.0.0", "Gisconnex ADM 2.0.0" | |
# Read-Host Para ler do prompt | |
# Write-Host Para escrever no prompt | |
$Keys = Get-ChildItem HKLM:\Software\Microsoft\Windows\CurrentVersion\Uninstall | |
$Items = $keys |foreach-object {Get-ItemProperty $_.PsPath} | |
foreach ($gc in $a) | |
{ | |
foreach ($item in $items) | |
{ | |
if ($item.Displayname -eq $gc) | |
{ | |
#$item | |
echo $item.DisplayName | |
echo $item.DisplayVersion | |
echo $item.InstallDate | |
echo $item.UninstallString | |
echo '' | |
$execString = $item.UninstallString.split(" ") | |
#& $execString[0] $execString[1].replace("I", "X") # Para chamar uninstal direto | |
& $execString[0] $execString[1] | |
Read-Host "Pressione enter apos o termino da remocao para continuar" | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment