Jump to content


This is a ready-only archive of the InstallSite Forum. You cannot post any new content here. / Dies ist ein Archiv des InstallSite Forums. Hier können keine neuen Beiträge veröffentlicht werden.
Photo

Feature Install with Scripting


3 replies to this topic

mouy

mouy
  • Members
  • 56 posts

Posted 02 September 2004 - 00:29

Hi,

How do I make a feature installable or not selected with MSI Scripting? I am using basic msi with installshield scripting.

I need to make it so that it is not reliant on the user's selection. EG through code I need to be able to manipulate what features will be installed.

Also, with the feature tree, how do I make the parent feature unselectable if the child feature is selected?


Please help!

Thanks.

Glytzhkof

Glytzhkof
  • Moderators
  • 1,447 posts

Posted 02 September 2004 - 01:00

In general you can do this by manipulating the install level of the feature. Setting it higher than the current INSTALLLEVEL for the setup, will cause them to not be installed, setting the level lower than or equal to the INSTALLLEVEL will cause them to be installed.
Regards
-Stein Åsmul

mouy

mouy
  • Members
  • 56 posts

Posted 02 September 2004 - 02:06

Hi,

I have tried that but it somehow doesnt seem to work.

IN the installscript I have tried setting the INSTALLLEVEL to a number lower than the install level for hte feature but it doesnt work.

I used MsiSetProperty.

I have also tried the following:

MsiSetInstallLevel(hInstall, 100);
MsiSetFeatureState(hInstall, "Server", INSTALLSTATE_ABSENT);

But the Feature "Server" is still getting installed.

mouy

mouy
  • Members
  • 56 posts

Posted 02 September 2004 - 07:18

Hi,

It finally worked. MsiSetFeatureState only works after CostFinalize with Immediate Execution.

Thanks,
Mouy ph34r.gif