View Full Version : Registry Entries [INSTALLDIR]

11-12-2003, 08:24 AM
How do you set properties such as the installation directory and the version number to the registry?

The help file says:

To write the value of a Windows Installer property called PropertyName to the registry, use the expression “[PropertyName]” in the value data.

I have tried



Neither of them copies the installdir to the registry

How do you do this?


11-12-2003, 10:37 AM
The [PropertyName] format works only for Windows Installer-based installations.

In InstallScript projects, you can use <TARGETDIR> in a registry value to expand the value of TARGETDIR into the registry at run time. You can use other <MY_VARIABLE> expressions in registry sets, too, but I believe you'll need to call FeatureSetTarget first to set up the connection between that variable and an actual value.

11-14-2003, 12:44 PM
I am having the same issues with the registry. I would like to add information so that when the user goes to the Add/Remove selection from Control Panel that they see information under the 'Product support' highlight. Currently it shows only the version number. I have tried to add manually, SOFTWARE >> MICROSOFT WINDOWS >> UNINSTALL then I add my GUID and put my keys under that. Not only does it not show the information in the Add/Remove, but it appears (from using RegEdit and Find) that the information does not get added at all. I have added other keys that appear to work for other software that resides on my system. The help file mentions something about the 'component group' that is used to decide if it is installed or not.... I cannot find the 'component group' under the Resigtry section at all.


11-14-2003, 04:21 PM
Well I found out a way to do it. However, it's not at all how the Dev 9 studio says how to do it. I can't find the Add/Remove section within the studio itself. I clicked on the General Information and the Project Properties........ I don't see anything there that allows me to modify other data in the 'support information' section of the Add/Remove programs section. I'd still like to get the help, because my method is done 'in code' and I'd rather learn the GUI properly....

So, although it is working :D I do still require help... :confused:

However, for those having the registry problems here's a function you can use:

function DoRegistry()

// sKey is Software key (for uninstall)
sKey = "Software\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\" + PRODUCT_GUID;
// Set the Support Information details:
RegDBSetKeyValueEx( sKey, "Publisher" , REGDB_STRING, "John Smith", -1 );
RegDBSetKeyValueEx( sKey, "Contact" , REGDB_STRING, "jsmith@whatever.com", -1 );
RegDBSetKeyValueEx( sKey, "HelpLink" , REGDB_STRING, "www.whatever.com\support.html", -1 );
RegDBSetKeyValueEx( sKey, "HelpTelephone" , REGDB_STRING, "1-888-555-5555", -1 );
RegDBSetKeyValueEx( sKey, "ReadMe" , REGDB_STRING, "ReadMeFirst.txt", -1 );
RegDBSetKeyValueEx( sKey, "ProductID" , REGDB_STRING, "This application", -1 );
RegDBSetKeyValueEx( sKey, "RegCompany" , REGDB_STRING, "Company Name", -1 );
RegDBSetKeyValueEx( sKey, "Comments" , REGDB_STRING, "My view on the world is ...", -1 );


Also, you will notice I have hard coded the information in, I don't need an answer back from the user because I am developing tools for internal company use only. However, if you want to capture information they've entered use these two lines:

STRING szTitle,svName,svComany,svSerial,nUser;
nResult = SdCustomerInformationEx(szTitle, svName, svCompany, svSerial, nUser);

Then you can replace my hard coded string with the variable used in the SdCustomerInformationEx call.

BTW... I found all of this from KB article q106801 :rolleyes:


11-14-2003, 04:25 PM
Hi Greg,

Currently, the ARP settings are only supported in the UI for the MSI project types. We are working on adding this for the InstallScript project type.


11-14-2003, 04:33 PM
Thanks for your information. That one line would have saved me several hours if it was contained in the help documentation. :mad:

I'm seeing a great deal of differences in the way that IS Dev 9 handles an MSI versus other packages.... is there a page with the differences (or known issues with each)?

Also, is one "better" than the other? I know it's all about what you're doing, but again I've been surfing the forums for hours and keep seeing reference that MSI package does things that the others don't. Perhaps a better way to phrase it .. "is one package type more robust than the other?"

Again, thanks for your reply --- good to know it wasn't a 'user issue' :cool:


11-14-2003, 04:42 PM
Hi Greg,

It totally depends on what you need.

The "Welcome Assistant" can help you figure out the right project type for you. It should launch the first time you launch the IDE. You can also get to it on the Help Menu.


01-23-2004, 12:29 PM
I opened a project created in Dev 8 with an installscript msi. The ARP information stayed intact and is fine with the user interface. But when I run my install in silent mode, (command line -- setup /s )the ARP information doesn't appear but the registry entries are there! Any body have any ideas? It worked fine in Dev 8

01-26-2004, 01:16 PM
Found the answer-- for whatever reason, the ARPSYSTEMCOMPONENT is set to 1 and the ARPNOREMOVE is set to 1. Changing both by using custom actions prior to the registry getting written didn't work, but changing the registry entry itself in OnFirstUIAfter works.

05-11-2004, 03:53 AM

why isn't it possible to use <PRODUCT_GUID> in registry sets of a pure InstallScript project? <TARGETDIR> works fine... I also tried <ProductCode>, but this seems to be MSI related. Any other possibilities?
This could avoid the script based way, as Greg described...