- new version of what's in Chocolatey - more complete description - uninstaller - automatically choose x86 / x64 based on OS
28 lines
762 B
PowerShell
28 lines
762 B
PowerShell
$package = 'ConEmu'
|
|
|
|
try {
|
|
|
|
# $productGuid = Get-ChildItem HKLM:\SOFTWARE\Classes\Installer\Products |
|
|
# Get-ItemProperty -Name 'ProductName' |
|
|
# ? { $_.ProductName -match 'ConEmu' } |
|
|
# Select -ExpandProperty PSChildName -First 1
|
|
|
|
$installerRoot = 'HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Installer'
|
|
$productsRoot = "$installerRoot\UserData\S-1-5-18\Products"
|
|
|
|
# x64, x86
|
|
'1616F7E78FA09834EAA6E0617006EEC7', '8ADD8A72FEF29D044884864D191B15B0' |
|
|
% { "$productsRoot\$_\InstallProperties" } |
|
|
? { Test-Path $_ } |
|
|
% {
|
|
$pkg = (Get-ItemProperty $_).LocalPackage
|
|
|
|
msiexec.exe /x $pkg /qb-!
|
|
}
|
|
|
|
Write-ChocolateySuccess $package
|
|
} catch {
|
|
Write-ChocolateyFailure $package "$($_.Exception.Message)"
|
|
throw
|
|
}
|