(Un)Install MSI Package

Got a problem you cannot solve? Try here.
h1234
Posts: 18
Joined: Tue Dec 28, 2010 3:19 pm

(Un)Install MSI Package

Postby h1234 » Wed Dec 29, 2010 10:29 am

I am brand new to AI so excuse any newbie questions. I did a search for this command but I did not find the answer to my question.
From what I see this command needs to point to a .MSI file (package file) or it needs the package GUID as a reference point so it knows what to uninstall. Yes/no?

In Wise Script Editor, which I've used for years I wrote a canned routine that did the following.

In your script you set a up a Variable that holds a value. this value is what you actually want to uninstall (as it appears in Control Panel).
Set REMOVE = Silverlight
Then my script will search the HKLM\Software\Microsoft\windows\Uninstall reg key for %REMOVE%. If found it will extract out the UninstallString value. It then will parse out the guid of 89F4137D-6C26-4A84-BDB8-2E5A4BB71E00. It will then run msiexec /x{89F4137D-6C26-4A84-BDB8-2E5A4BB71E00}

So it does not matter what version of Silverlight you had nor does it matter what the GUID is, it will be uninstalled without knowing the package file or the guid. it saved my bacon many times 8)

Can AI do that? If so how? The (Un)Install MSI Package command does not appear to have that fuction built in.

Thank you.

giaviv
Posts: 2039
Joined: Fri Dec 17, 2010 1:39 pm

Re: (Un)Install MSI Package

Postby giaviv » Wed Dec 29, 2010 3:24 pm

Dear h1234,

I did not quite understand - what is it that you are trying to achieve exactly? Uninstalling a program when you have its GUID? Or its name?

Thanks,
Aviv Giladi
InstallAware Support
Aviv Giladi
InstallAware Software

White Papers (HowTos) - http://www.installaware.com/publication ... papers.htm
Product Guides - http://www.installaware.com/publication ... guides.htm
InstallAware Help -F1 anywhere in the InstallAware IDE

h1234
Posts: 18
Joined: Tue Dec 28, 2010 3:19 pm

Re: (Un)Install MSI Package

Postby h1234 » Thu Dec 30, 2010 10:24 am

Sorry if I was unclear. A few years ago I wrote a Wise Script Editor routine that did this.

In the .wse file I create variables called STRING_VAR and DUMPFILE
I install scanreg.exe
I set STRING_VAR to what i want to install as it appears in Add/Remove Programs. In this case Silverlight
I set DUMPFILE to silverlight.txt
I then execute scanreg.exe on my Uninstall reg hive and dump the results to %DUMPFILE%
I then parse %DUMPFILE% to extract out my GUID
I then run msiexec.exe /x{guid}

So I took this code and I imported it into AI since you have the Import Wise Script Feature (which is really cool). I run DEBUG and I get this error:
UninstallProdCode - InstallAware Studio Admin
List index out of bounds (-1)


But it does not highlight any line so I am not sure where the error is.

I will say that so far I think this is a very cool product and I like it !!

giaviv
Posts: 2039
Joined: Fri Dec 17, 2010 1:39 pm

Re: (Un)Install MSI Package

Postby giaviv » Thu Dec 30, 2010 11:20 am

h1234,

I am glad you like InstallAware. Could you please attach (or send to support@installaware.com) your wise script?

Thanks,
Aviv Giladi
InstallAware Support
Aviv Giladi
InstallAware Software

White Papers (HowTos) - http://www.installaware.com/publication ... papers.htm
Product Guides - http://www.installaware.com/publication ... guides.htm
InstallAware Help -F1 anywhere in the InstallAware IDE

giaviv
Posts: 2039
Joined: Fri Dec 17, 2010 1:39 pm

Re: (Un)Install MSI Package

Postby giaviv » Thu Dec 30, 2010 12:50 pm

h1234,

Your script converts just fine for me.. How are you converting it, which InstallAware version are you running and on what operating system?

Thanks,
Aviv Giladi
InstallAware Support
Aviv Giladi
InstallAware Software

White Papers (HowTos) - http://www.installaware.com/publication ... papers.htm
Product Guides - http://www.installaware.com/publication ... guides.htm
InstallAware Help -F1 anywhere in the InstallAware IDE

h1234
Posts: 18
Joined: Tue Dec 28, 2010 3:19 pm

Re: (Un)Install MSI Package

Postby h1234 » Thu Dec 30, 2010 2:49 pm

Hello. I can covert my script from .WSE into an IA file as well. But I can't compile or run it. I am using IA 10.x and I am running it on a Windows 7 64bit OS

giaviv
Posts: 2039
Joined: Fri Dec 17, 2010 1:39 pm

Re: (Un)Install MSI Package

Postby giaviv » Fri Dec 31, 2010 1:27 am

Dear h1234,

After the conversion, two "end" statements exist at line 47 (when of them is redundant). Once you remove one of those your script will run.

Thanks,
Aviv Giladi
InstallAware Support
Aviv Giladi
InstallAware Software

White Papers (HowTos) - http://www.installaware.com/publication ... papers.htm
Product Guides - http://www.installaware.com/publication ... guides.htm
InstallAware Help -F1 anywhere in the InstallAware IDE

giaviv
Posts: 2039
Joined: Fri Dec 17, 2010 1:39 pm

Re: (Un)Install MSI Package

Postby giaviv » Wed Jan 19, 2011 9:15 pm

Dear InstallAware users,

Please note that the best way to install MSI setups are with the use of our (Un)Install MSI Setup plugin - it is intuitive, easy, and integrated right into InstallAware.
I am attaching a tutorial how to use it here - I strongly suggest that you read it since this plugin is very useful!

Best
Attachments
msi setup.docx
(1.98 MiB) Downloaded 1780 times
Aviv Giladi
InstallAware Software

White Papers (HowTos) - http://www.installaware.com/publication ... papers.htm
Product Guides - http://www.installaware.com/publication ... guides.htm
InstallAware Help -F1 anywhere in the InstallAware IDE

bokkie
Posts: 767
Joined: Sun Feb 08, 2009 6:30 am

Re: (Un)Install MSI Package

Postby bokkie » Thu Jan 20, 2011 4:03 am

Excellent document describing how to run other installers. Thanks for posting it. It clears up a lot of questions I had about the preferred way to do it.
Peter. Smartly dressed, he still resembles an unmade bed.
InstallAware MVP


Return to “Technical Support”

Who is online

Users browsing this forum: No registered users and 24 guests