cancel
Showing results for 
Search instead for 
Did you mean: 
reddragon105
Pilgrim

Variables for use in Registry entries?

I've made installations using InstallShield before which place entries in the registry and as I usually give the user the option to choose the installation location I always make one of the entries [INSTALLDIR] so that the menu programs I make can find it.

But now I'm making a program where I'd like to create a registry entry that contains the path that the program was installed from. Is there a variable that I can use for that? I've tried [SRCDISK] and [SRCDIR] but neither have worked (the registry key is created, but its value is blank).

Any help on how to do this? Surely there's a way of doing it and I just don't know what to type.
Labels (1)
0 Kudos
3 Replies
RobertDickau
Pilgrim

Re: Variables for use in Registry entries?

Please see the InstallShield help topic "SETUPEXEDIR" for a couple of options. The MSI help has information about built-in properties, and InstallShield adds several.
0 Kudos
Highlighted
reddragon105
Pilgrim

Re: Variables for use in Registry entries?

Thank you very much. [SETUPEXEDIR] was exactly what I wanted.

I should have put a disclaimer that said that I'm a total newbie to InstallShield so please forgive my ignorance - I have tried to work it out myself, have checked the Help files and have Googled extensively, but my handicap is that the software is still a bit alien to me so I don't really know what I'm looking for, which makes it hard to know what to search for.

My experience so far is making simple installers as Basic MSI Projects using the Project Assistant. I've been adding the [INSTALLDIR] registry entry because some programs that I'm making installers for require this, but also because I'm also making menus in VB6 that detect whether the program is installed or not and display 'Install' or 'Run' as appropriate. If you click 'Run' the VB program obviously needs to know where the .exe is located, so it checks the registry entry created by InstallShield to find the path. I'm not sure how I found out that typing [INSTALLDIR] into a registry string in InstallShield did this, so I wasn't sure how to go about finding the variable for the setup directory for the program I'm currently working on which needs to access files from the disk it was installed from when it's running.

Anyway, thanks again. The next thing I need to do is to run an executable that's installed by the installer after installation is finished (just to automatically execute it, without giving the user the option, and preferably before the final dialog box that says 'Installation is complete'). From what I've read, I need to use a Custom Action, but I have no idea how to do that. I'll struggle with it some more and then come back with some questions!
0 Kudos
RobertDickau
Pilgrim

Re: Variables for use in Registry entries?

Thanks for the follow-up---to launch an executable after it's installed, you can use a "launch EXE > installed with the product" custom action, scheduled for deferred execution after InstallFiles, with a condition like Not Installed to ensure that it runs only during the initial installation (and not during, say, uninstallation).

For some misc. background, perhaps see this old newsletter tip (PDF warning): http://www.acresso.com/webdocuments/PDF/launch.pdf.
0 Kudos