Uninstall from the command line

Got a problem you cannot solve? Try here.
tzachk
Posts: 171
Joined: Wed Jul 18, 2012 12:14 am

Uninstall from the command line

Postby tzachk » Thu Sep 03, 2015 2:53 am

Hi Francesco,

I have a question regarding uninstalling through the command line.
I found the following in the documentation.
<setup.exe> /s MODIFY=FALSE REMOVE=TRUE UNINSTALL=YES

The problem is that the msi installer leaves in the TEMP folder of the user performing the c:\users\user\Appdata\local\Temp a file with the ID {27146105-B204-4244-9758-C49974D7555D}.exe, instead of product_name.exe . And the ID in brackets is ofcourse a GUID I can't predict in advance.
What am I'm missing here?

Regards,
T.

FrancescoT
Site Admin
Posts: 5361
Joined: Sun Aug 22, 2010 4:28 am

Re: Uninstall from the command line

Postby FrancescoT » Thu Sep 03, 2015 11:58 am

Dear Tzachk,

you can also use the value of the "UNINSTALLLINK" pre-defined variable.
This value points to; "Full path to the cached copy of your installer".
Then use such path to run the un-install from anywhere.

Alternatively, you may query the target system registry to retrive the value of "UnInstallString".

This information is stored under:
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\<PRODUCTCODE>

The same can be alternatively listed under the below registry path, in case of 32 bit application installed on a x64 OS.
HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\Uninstall\<PRODUCTCODE>.

Hope this helps you.

Regards
Francesco Toscano
InstallAware Software

White Papers (HowTos) - http://www.installaware.com/publication ... papers.htm
Publications - http://www.installaware.com/publications-review.htm
InstallAware Help -F1 anywhere in the InstallAware IDE

tzachk
Posts: 171
Joined: Wed Jul 18, 2012 12:14 am

Re: Uninstall from the command line

Postby tzachk » Sun Sep 06, 2015 4:04 am

Hi Francesco,

Thank you for your answer.
I checked the registry. For some reason even though our application is 64 bit, the unistallstring appeared only in wow6432node
The PRODUCTCODE that appears with the name of our product in the details, is not the correct product code. I don't know which product code it is. Maybe it is the version code? but then How would I find it?

I then found an entry with the name of our product (name, not PRODUCTCODE) which contained the right string. But it seems a bit of a mess or I do not understand the logic here.

TZach

FrancescoT
Site Admin
Posts: 5361
Joined: Sun Aug 22, 2010 4:28 am

Re: Uninstall from the command line

Postby FrancescoT » Mon Sep 07, 2015 11:06 am

Dear TZach,

if your app is a native 64 bit, it should not be listed under the "wow6432node" key of the target registry. I can only suppose that probably, you missed to set the x64 mode with your installer ("Set x64 - Native 64 bit Windows, xxxx..." script statement).

For what concerns the un-install string, is your installer based on MSI or NATIVE Engine?

If you used Native Engine, the UnInstallString is stored under;
"HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\<TITLE>" (where TITLE is the value of the "TITLE" pre-defined variable).

Alternatively, you may store somewhere on the target machine the value of the "UNINSTALLLINK" pre-defined variable.

Regards
Francesco Toscano
InstallAware Software

White Papers (HowTos) - http://www.installaware.com/publication ... papers.htm
Publications - http://www.installaware.com/publications-review.htm
InstallAware Help -F1 anywhere in the InstallAware IDE


Return to “Technical Support”

Who is online

Users browsing this forum: No registered users and 132 guests