This website uses cookies. By clicking Accept, you consent to the use of cookies. Click Here to learn more about how we use cookies.
Turn on suggestions
Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.
- Revenera Community
- :
- InstallShield
- :
- InstallShield Forum
- :
- component will not be removed, so that icon will not be removed.
Subscribe
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Subscribe
- Mute
- Printer Friendly Page
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
Jun 03, 2015
04:06 AM
component will not be removed, so that icon will not be removed.
Hi
I have basic MSI project that 2 or more versions of it can be installed in parallel
Each one to a different location except for a single exe which is shared and has a shortcut in the desktop.
In version 1.0 MSI I have
Component – install files to \Program Files\prod_1.0
Shared files component A - install exe to \Program Files\prod_shared
Shared shortcut component B - create a shortcut on desktop to exe in component A
In version 2.0 MSI I have
Component – install files to \Program Files\prod_2.0
Shared files component A - install exe to \Program Files\prod_shared
Shared shortcut component B - create a shortcut on desktop to exe in component A
The component GUID are the same for both MSI versions and the icon I’m using in the Shared shortcut component isn’t used by other shortcuts.
The problem I have is that if I have 2 version? installed in parallel and then I uninstall one version I want the desktop shortcut will be removed.
I added this line to the code
MsiSetComponentState(hMSI,"Shared_Shortcut_Desktop",INSTALLSTATE_ABSENT);
But when I uninstall I get this message
component will not be removed, so that 'NewShortcut74_AE5D17DE4C4B4737ABB20A0D0358B69E.exe' icon will not be removed.
Any idea how to solve it ?
I have basic MSI project that 2 or more versions of it can be installed in parallel
Each one to a different location except for a single exe which is shared and has a shortcut in the desktop.
In version 1.0 MSI I have
Component – install files to \Program Files\prod_1.0
Shared files component A - install exe to \Program Files\prod_shared
Shared shortcut component B - create a shortcut on desktop to exe in component A
In version 2.0 MSI I have
Component – install files to \Program Files\prod_2.0
Shared files component A - install exe to \Program Files\prod_shared
Shared shortcut component B - create a shortcut on desktop to exe in component A
The component GUID are the same for both MSI versions and the icon I’m using in the Shared shortcut component isn’t used by other shortcuts.
The problem I have is that if I have 2 version? installed in parallel and then I uninstall one version I want the desktop shortcut will be removed.
I added this line to the code
MsiSetComponentState(hMSI,"Shared_Shortcut_Desktop",INSTALLSTATE_ABSENT);
But when I uninstall I get this message
component will not be removed, so that 'NewShortcut74_AE5D17DE4C4B4737ABB20A0D0358B69E.exe' icon will not be removed.
Any idea how to solve it ?
(1) Reply
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
Jun 03, 2015
02:26 PM
Installing the same component GUID to multiple different locations is a violation of component rules (see Changing the Component Code and the related What happens if the component rules are broken?). It's up to Windows Installer what it will do in this scenario, and I expect you need to change the component's GUID.
![](/skins/images/8CE4FAD0DE6F3A6F9D0567434D2D2DAE/responsive_peak/images/icon_anonymous_message.png)