View Full Version : MSISetProperty vs TextSubSetValue

Mark Koehler
07-31-2008, 10:49 AM
OK, I admit. I'm a little behind on the learning curve. Can someone explain to me the difference between using MSISetProperty and TextSubSetValue within an InstallScript MSI project. Are there advantages to one over the other? Disadvantages?

The specific example where I'm trying to use these is to set the web site name, web site port and web site number dynamically prior to installing my web site.

Also, when is the appropriate time to use these functions.

I'm currently using InstallShield 2008 but will be updating to 2009 later today.

07-31-2008, 11:24 AM
For something like website names, ports, etc. you should work with MSI properties in an InstallScript MSI project. This project type is basically a Windows Installer package with the InstallScript engine driving the user interface and kicking off the MSI installation. That being the case, all the MSI functionality for features like IIS is used instead of the InstallScript functionality. Attempting to use text subs won't work as expected for something like IIS (unless you were working with a pure InstallScript project).

You can call MsiSetProperty from any point in the installation prior to the caExtractIISSuppFiles action that runs in the execute sequence. This would include the OnBegin and OnFirstUIBefore events, or a custom action sequenced in the execute sequence before caExtractIISSuppFiles.

Note that you will want to apply the hotfix provided in KB Q200163 (http://kb.acresso.com/selfservice/microsites/search.do?cmd=displayKC&docType=kc&externalId=Q200163&sliceId=1&docTypeID=DT_HOTFIX_1_1&dialogID=23379905&stateId=0%200%2023377504) to ensure all websites and virtual directories using properties for their names get installed.

Mark Koehler
07-31-2008, 11:29 AM
Thanks for the info and especially the heads up on the hotfix. I'm sure I would have been banging my head for a bit on that one.