cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
dmetzler
Level 6

Error Uninstalling

I have changed project settings for my msi installer. Now when I attempt to uninstall, I get a message:

This action is only valid for products that are currently installed.

What does this mean?

Regards,

Don Metzler
Labels (1)
0 Kudos
(15) Replies
dan_galender
Level 10

It means that the product associated with that MSI's ProductCode (GUID) is not currently installed.
0 Kudos
dmetzler
Level 6

DanGalender wrote:
It means that the product associated with that MSI's ProductCode (GUID) is not currently installed.


The uninstall works okay from the Control Panel Add/Remove Icon. And then I am able to re-install by running the installer.

But the uninstall link from the Start Menu does not work:
F:\Windows\System32\msiexec.exe /x {4F26C164-9373-4974-8F43-E0F2176AF937}

This is the correct product code in the InstallShield project.

Don
0 Kudos
dan_galender
Level 10

Well, speaking as one who hates uninstallation shortcuts off of the Start Menu, I'd say that's a good thing. 🙂

With the product installed, take a look at the registry key

HKEY_LOCAL_MACHINE\SOFTWARE\Micosoft\Windows\CurrentVersion\Uninstall\{4F26C164-9373-4974-8F43-E0F2176AF937}

Is that key there?

If so, what is the value data of the UninstallString value name?
0 Kudos
dmetzler
Level 6

DanGalender wrote:
Well, speaking as one who hates uninstallation shortcuts off of the Start Menu, I'd say that's a good thing. 🙂

With the product installed, take a look at the registry key

HKEY_LOCAL_MACHINE\SOFTWARE\Micosoft\Windows\CurrentVersion\Uninstall\{4F26C164-9373-4974-8F43-E0F2176AF937}

Is that key there?

If so, what is the value data of the UninstallString value name?


It's for a client who wants the uninstall shortcut.

I have checked the above registry key, but it does not exist.

Don
0 Kudos
dan_galender
Level 10

That means that the product with that product code is not installed.

Is the Product Code in the General Information, Product Properties, Product Code really {4F26C164-9373-4974-8F43-E0F2176AF937}?

You said that you changed some project properties. Could you have created the uninstallation shortcut (maybe in the Project Assistant) and later changed the Product Code? If so, that could explain the differences in the current Product Code and the GUID in the shortcut.
0 Kudos
dmetzler
Level 6

DanGalender wrote:
That means that the product with that product code is not installed.

Is the Product Code in the General Information, Product Properties, Product Code really {4F26C164-9373-4974-8F43-E0F2176AF937}?

You said that you changed some project properties. Could you have created the uninstallation shortcut (maybe in the Project Assistant) and later changed the Product Code? If so, that could explain the differences in the current Product Code and the GUID in the shortcut.


Yes - checked the project properties and it is: {4F26C164-9373-4974-8F43-E0F2176AF937}

I also checked the uninstall shortcut and it references the same GUID.

Anything else I can check? The properties changed were related to the Media/Upgrades settings.
0 Kudos
dan_galender
Level 10

With the product installed you could run though all of the GUID subkeys under the registry key

HKEY_LOCAL_MACHINE\SOFTWARE\Micosoft\Windows\CurrentVersion\Uninstall\

and on each subkey look at the value data for the value name DisplayName. See if you can find your product's name there. When you do, what is the GUID subkey and what is the UninstallString value in that subkey?
0 Kudos
dmetzler
Level 6

DanGalender wrote:
With the product installed you could run though all of the GUID subkeys under the registry key

HKEY_LOCAL_MACHINE\SOFTWARE\Micosoft\Windows\CurrentVersion\Uninstall\

and on each subkey look at the value data for the value name DisplayName. See if you can find your product's name there. When you do, what is the GUID subkey and what is the UninstallString value in that subkey?


I found it in the GUID: {D45A8287-2403-4FAE-8C52-8B4CB2DEFEF2}
0 Kudos
dan_galender
Level 10

And is the UninstallString something like

Msiexec.exe /I{D45A8287-2403-4FAE-8C52-8B4CB2DEFEF2}

or

Msiexec.exe /X{D45A8287-2403-4FAE-8C52-8B4CB2DEFEF2}?
0 Kudos
dmetzler
Level 6

C:\Windows\System32\msiexec.exe /x {4F26C164-9373-4974-8F43-E0F2176AF937}
0 Kudos
dan_galender
Level 10

It sure looks like there a disconnect between the product that's installed and the project you're looking at. At this point I would try to uninstall any instances of the product, check that there are no shortcuts for the product, and no entries in Add/Remove Programs for your product--or find another clean machine that's never had your product installed on it.

Then rebuild your project, and try installing it on this clean system. See if the problem is still occurring and if so, look at these registry and shortcut settings again.

Those GUIDs (the Product Code property in the Product Settings, the subkey under the Uninstall subkey, the one in the UninstallString, and the one in the uninstallation shortcut) should all be the same.
0 Kudos
dmetzler
Level 6

DanGalender wrote:
Those GUIDs (the Product Code property in the Product Settings, the subkey under the Uninstall subkey, the one in the UninstallString, and the one in the uninstallation shortcut) should all be the same.


Thanks for your help. I will see if I can track this down.

Is is possible that the main project GUID is being overridden somewhere else in the project settings?
0 Kudos
dan_galender
Level 10

In an MSI project there is no Project GUID. There's are GUIDs for Package Code, Product Code, and Upgrade Code.
0 Kudos
dmetzler
Level 6

DanGalender wrote:
In an MSI project there is no Project GUID. There's are GUIDs for Package Code, Product Code, and Upgrade Code.


I guess I meant Product Code.
0 Kudos
BNewell
Level 3

Sorry to jump in, but I was struggling with this until just recently as well. It appears that when Installshield makes the uninstall shortcut, it's msiexec /x {blah blah blah}. Unfortunately, at least for the case of a script MSI installer, this doesn't seem to be the proper way to uninstall. It actually needs to call a hidden copy of the setup it stores on the user's HD. Annoying, but fine, as long as Installshield would call that when it uninstalls.

But, since it doesn't (ONLY when the start menu shortcut it created is used), I wrote a small C# application to pull the uninstall keyvalue from the registry and just launch that. Then I pointed my uninstall shortcut launch at this new application (which I also now have to deploy in my installer...) Works fine, although it seems like way more work than it should be.

-Ben
0 Kudos