Click here to Skip to main content
15,892,697 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
I have a program that I can add "modules" that will extend the product's functionality.

These modules require that I load in a dll underneath the install directory and update the registry.

The original program created a registry key call "installDir" that hold the path to the installation.

What I would like to do it to read that key and use it as the install path. I.e. don't give the user an option on where to install to, it just goes and does it.

Can anyone help me understand how I can read a registry key using VS Setup and Deployment and use that as the install path for my installation?
Posted

1 solution

Try this out:

1. In you VS Deployment Project Select 'Launch Conditions Editor'

2. Right Click on the 'Search Target Machine' and select 'Add Registry Search'

3. This will add a new reg search item, selecting the properties of this item will expose :

- Property : this is where you want store the retrieved value
- RegKey: the key you require.
- Root: the root hive you wish.
- Value: a value you wish to test against.


Hope this helps...
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900