View Full Version : Uninstallation problem - permanant features files- urgent

Uguen Alan
07-25-2002, 04:02 AM

I currently use the Standard project on IS7.04.
i have two setups that can be merged in a same INSTALLDIR directory, same progrma shortcut group too.
The two setup shares dll and other files, but must be installed on different setup.

I would like that the first maintenance mode only uninstalls some features and not all the features.

I have seen that featureremoveall method unselects all features and after i have selected the features that i want to keep, in spite of it all features were removed.
Is it possible to set the permanent property to a feature dynamically in a script, FeatureSetData not allows to set this property.
The problem if i leave the FeaturRemoveAll i must manually delete somme files, shortcut and registry entrys, what it is not really good.

Can someone can help me please to resolve my problem it is urgent.
Thanks !!


07-25-2002, 07:04 AM
I really don' t understand what you're trying to do. But more than one product can share a component, so you can create 2 separate products that share some files (and detect eachother).

You can remove features by using the REMOVE property.



Uguen Alan
07-25-2002, 07:19 AM
thanks for your answer Rene,

sorry for my english.

What i wanna do is to have the possibility to remove only some features and not all features during maintenance mode . I don't want put the permanent with the IDE of IS7.04 because in some sace i want remove all.
It is why i would like put the permanent property for some features in the script.

My problem is only in case of merge installation directory between two products.

Is it the correct syntaxe ? REMOVE= feature1, feature2;
can be put in the setup.rul script ?



07-25-2002, 09:23 AM
From what understand now, you want the files installed permanently because you've got another program using them.

If you set components to be shared, you can use them in both products, so you don't need to remove only certain features. The files will automagically be left for the other program.

About the REMOVE property. That's a property and is used by Windows Installer. So it's usefull in the script.

You could use MsiSetProperty to set the REMOVE property from the script.
Also you could use actions such as AddLocal Remove etc. to control features.

Refer to the SDK for more information.

Hope this helps.

07-25-2002, 10:07 AM
If you set a component property to Shared, it will not be uninstalled when program 2 is uninstalled and program 1 is still there, right? If I want to unsintall both programs, will the 'Shared' component be uninstalled, or is it there permenently?

Uguen Alan
07-25-2002, 10:22 AM
Thanks very much for your response.

In actual fact, I didn't really explain myself very well, so here's an example of what I'm trying to do:

Product_1 :
Components1 (shared with Products_2)
Components2 (not shared)
Components3 (not shared)

Product_2 :
Components1 (shared with Products_1)
Components4 (not shared)
Components5 (not shared)

I install Product_1 to the same directory as Product_2.

What I want to happen:
1) When I uninstall Product_2, I'd like the maintenance mode to remove Components4 and Components5 and all shortcuts associated with these components (whether merged or not)
2) When I uninstall Product_1 I'd like everything to be removed

Potentially, nearly all my components can be shared with other products. Does the "shared" property work correctly as far as you know? For Product_2 I retrive the SHELL_OBJECT_FOLDER from Product_1 however, IS7.0 apparently does not put my new shortcut in the SHELL_OBJECT_FOLDER. Have you any idea why this might be?

For Product_2:
int nRet = MsiSetProperty( ISMSI_HANDLE, REMOVE, Components4, Components5 )

is this correct?


07-26-2002, 02:27 AM
int nRet = MsiSetProperty( ISMSI_HANDLE, "REMOVE", "Components4, Components5" );

This would work provided you set it early enough (I'm not sure where).

What does your shared component consist of?

Uguen Alan
07-26-2002, 04:33 AM

My various shared components can contain DLLs, bitmaps and other dependent files.
I've left the same GUID for these various components
I can merge two installations of two different products in to one folder, but I can also install them to two different folders
At present, all my components are shared.

I also have a new problem:

When installing the suites to different folders, I realize now that if I uninstall a product, nearly everything is removed correctly, however the empty installation folder is left behind!!??, and even more annoying is the fact that the shortcuts from the keyfiles are also left behind :o). Some components consist only of executables that have a keyfile (for shortcuts in particular).
These executables can be in different products and are initialized according to the product that is installed.

Solution: change the GUID?? but in this case I get a problem when merging folders... and if I remove the shared property, the executable will be uninstalled whereas the product remaining in the merged folder still needs to use it.

Have you any ideas that may help solve my problems?

Mayn thanks in advance,