Jump to content

Recommended Posts

Posted

creating an uninstall that is version agnostic for Adobe Air.

When on the machine from

C:\Program Files (x86)\Common Files\Adobe AIR\Versions\1.0

@ a command prompt, I can run

msiexec.exe /x setup.msi /qb-!

and it works perfectly.

Now here is the problem, I can run with an autoit ".exe" using the @homedrive macro just fine without a problem. But when i run

RunWait ("msiexec.exe /x " & @CommonFilesDir & "\Adobe Air\Versions\1.0\setup.msi /qb-!")

 from an autoit ".exe" I get the msi info window (screenshot attached) saying something is wrong. It appears to be a permissions issue but i cannot figure out what to do to fix this.

example if i move the files to "c:\temp" and run an autoit ".exe" using

RunWait ("msiexec.exe /x " & @HomeDrive & "\Temp\setup.msi /qb-!")

 it works perfectly.

Capture.PNG

Posted (edited)

BEAUTIFUL!!!!!

So... Can you tell me why? Is it because of the space in the "Adobe Air"? But it works with the space using @HomeDrive! What makes this work and why?

 

Thanks so much!

Edited by TheLug
more details
  • Moderators
Posted

I'm not sure if it works for Adobe Air specifically (depends on how it loads into the Uninstall hive in the registry), but when I am uninstalling and need to be version-agnostic I usually turn to WMI:

$oWMI = ObjGet("winmgmts:{impersonationLevel=impersonate}!\\.\root\cimv2")
$aProducts = $oWMI.ExecQuery("Select * from Win32_Product")

For $app in $aProducts
    If StringInStr($app.Name, "7-Zip") Then
        ;ConsoleWrite("Uninstalling " & $app.Name & @CRLF)
        $app.Uninstall()
    EndIf
Next

 

"Profanity is the last vestige of the feeble mind. For the man who cannot express himself forcibly through intellect must do so through shock and awe" - Spencer W. Kimball

How to get your question answered on this forum!

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...