I am currently looking to remove Adobe Acrobat Reader from an ecosystem, and have been able to complete the bones of the ps script. I know Adobe products don't like to play nice, but I at least want to have an attempt here. Whenever I run this script in /qn, I get Error 1730. Since its spawning msiexec, i'm assuming UAC is not passed during /qn or /quiet, as whenever I allow for a basic interface using /qb, a UAC popup occurs and I am able to remove it completely afterwards.
This is my simple code that i've been utilizing:
function regvalue {
$global:guid = Invoke-Command -ScriptBlock { Get-ItemPropertyValue $global:regpath 'ENU_GUID'}
$global:storage = $global:guid
}
function caller {
regvalue
$global:creds = Get-Credential -Credential Domain\user
$global:command = Start-Process "msiexec.exe" -arg "/x $global:storage /qb /norestart" -Credential $global:creds -wait
$global:command
}
$global:regpath = 'HKLM:\Software\Wow6432Node\Adobe\Acrobat Reader\DC\Installer'
caller
All this is doing essentially is querying the registry for the uninstall string or the ENU_GUID in Adobe terms. Once it gets the value it executes the msiexec with the string as the argument as well with any trailing parameters.
I cannot feasibly push this out if it requires a UAC prompt every time, which this script requires currently to execute. I'm logged in on a admin account, I've tried running ps in admin, and i've tried forcing a parameter check in the argument itself (which i suspect is redundant), none of which has been a workaround.
Basically, is there any simple workaround to ensure a UAC push from ps that i'm missing here?