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
- :
- Database folder path in Registry?
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
‎May 13, 2008
03:20 PM
Database folder path in Registry?
If the user changes the path for the database folder during installation, is the new path saved in the registry? How can my application know where to find the database?
(5) Replies
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎May 13, 2008
03:48 PM
Property and directory settings are not automatically saved to the registry. You might want your installer to write the database location to the registry so that it would be available to the application.
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎May 13, 2008
03:58 PM
Thanks, Dan. Yes, I would like the installer to save the database folder path in the registry, in a known location. How do I do that?
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎May 14, 2008
09:12 AM
Before commenting, I guess I should have asked which project type you are using.
If Basic MSI, you would create a "Registry" entry and under the desired key create a Registry Value (with whatever Value Name you want to give it, "DatabaseFolder" maybe?) whose Value Data is "[DATABASEFOLDER]" where DATABASEFOLDER is the Directory Identifier of that location. If you're not familiar with creating registry values, look at the help topic "Creating Registry Values"
If you're using an InstallScript project, you would either use the functions RegDBSetDefaultRoot and RegDBSetKeyValueEx to create the value or create a registry set with the appropriate registry key, use a user defined variable in the form as the Value Data, and have a FeatureSetTarget function call set the value of to the value of the location where the database in being installed.
If Basic MSI, you would create a "Registry" entry and under the desired key create a Registry Value (with whatever Value Name you want to give it, "DatabaseFolder" maybe?) whose Value Data is "[DATABASEFOLDER]" where DATABASEFOLDER is the Directory Identifier of that location. If you're not familiar with creating registry values, look at the help topic "Creating Registry Values"
If you're using an InstallScript project, you would either use the functions RegDBSetDefaultRoot and RegDBSetKeyValueEx to create the value or create a registry set with the appropriate registry key, use a user defined variable in the form
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎May 14, 2008
06:51 PM
Thanks Dan. You're a life-saver!
It works great. The user can now select or create a folder for the database file during the installation, and my application can find the file when it runs.
I used to keep the database in the program folder, but this is a no-no with Vista.
(For the benefit of anyone else reading this topic, the Registry value should be [DATABASEDIR] not [DATABASEFOLDER]. Took me a few minutes to discover that.)
Thanks again,
Crawford
It works great. The user can now select or create a folder for the database file during the installation, and my application can find the file when it runs.
I used to keep the database in the program folder, but this is a no-no with Vista.
(For the benefit of anyone else reading this topic, the Registry value should be [DATABASEDIR] not [DATABASEFOLDER]. Took me a few minutes to discover that.)
Thanks again,
Crawford
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎May 15, 2008
12:17 AM
CWoodman wrote:
Thanks Dan. You're a life-saver!
It works great. The user can now select or create a folder for the database file during the installation, and my application can find the file when it runs.
I used to keep the database in the program folder, but this is a no-no with Vista.
(For the benefit of anyone else reading this topic, the Registry value should be [DATABASEDIR] not [DATABASEFOLDER]. Took me a few minutes to discover that.)
Thanks again,
Crawford
Crawford-
I was using "DATABASEFOLDER" as a placeholder to mean whatever directory identifier you were using as the destination for the database (that's why I said "Where DATABASEFOLDER is the Directory Identifier of that location") since I didn't know what identifier you were using.
I'm glad you got it working.