Created
October 16, 2017 22:41
-
-
Save delthas/723590c42ee69004ed458dcbd0aa079d to your computer and use it in GitHub Desktop.
Exact Audio Copy uninstall automation script
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
$ErrorActionPreference = 'Stop' | |
$toolsDir = "$(Split-Path -parent $MyInvocation.MyCommand.Definition)" | |
$ahkScript = "$toolsDir\eacuninstall.ahk" | |
[array]$key = Get-UninstallRegistryKey -SoftwareName 'Exact Audio Copy*' | |
if ($key.Count -eq 1) { | |
$key | % { | |
AutoHotkey $ahkScript "$($_.UninstallString)" | |
} | |
} elseif ($key.Count -eq 0) { | |
Write-Warning "$packageName has already been uninstalled by other means." | |
} elseif ($key.Count -gt 1) { | |
Write-Warning "$($key.Count) matches found!" | |
Write-Warning "To prevent accidental data loss, no programs will be uninstalled." | |
Write-Warning "Please alert package maintainer the following keys were matched:" | |
$key | % {Write-Warning "- $($_.DisplayName)"} | |
} |
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
#NoEnv | |
SetTitleMatchMode RegEx | |
IfExist, %1% | |
{ | |
Run, %1% | |
WinWait,Exact Audio Copy [\d\.]+ Uninstall,, 30 | |
IfWinExist | |
{ | |
BlockInput, On | |
Sleep, 250 | |
WinActivate | |
SendInput, {Left}, {Enter} | |
BlockInput, Off | |
} | |
WinWait, Exact Audio Copy [\d\.]+ Uninstall, successfully, 30 | |
IfWinExist | |
{ | |
BlockInput, On | |
Sleep, 250 | |
WinActivate | |
SendInput, {Enter} | |
BlockInput, Off | |
} | |
exit | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment