This website uses cookies. By clicking Accept, you consent to the use of cookies. Click Here to learn more about how we use cookies.
Turn on suggestions
Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.
- Revenera Community
- :
- InstallShield
- :
- InstallShield Forum
- :
- Variables for use in Registry entries?
Subscribe
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Subscribe
- Mute
- Printer Friendly Page
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Jul 25, 2009
03:29 PM
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.
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.
(3) Replies
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Jul 25, 2009
07:18 PM
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.
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Jul 26, 2009
08:28 AM
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!
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!
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Jul 26, 2009
01:54 PM
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.
For some misc. background, perhaps see this old newsletter tip (PDF warning): http://www.acresso.com/webdocuments/PDF/launch.pdf.
![](/skins/images/D60DF682EA37BF37032955CE10F3F0BB/responsive_peak/images/icon_anonymous_message.png)