store install folder to registry not possible

  • Thread starter Thread starter Brent Shire
  • Start date Start date
B

Brent Shire

To anyone who is willing and able to help me!

I have developed a Windows application in VB .NET and wish to deploy it from
a CD using a typical install program. I have created a deployment project
in VS .NET, and all works as expected, except for one thing.

The requirement is that I need to record the folder selected by the user
during install as where the VB program application will be installed to,
into the registry key:
HKEY_LOCAL_MACHINE\Software\[Manufacturer]\InstallPath.

I have entered [TARGETDIR] into the Value field of a registry key I created
in the Registry Editor (within the set up project). But alas, when compiled
and executed, the literal string [TARGETDIR] is stored rather than the
actual folder name!

Surely I am not the first person who has this problem or needs this
requirement?

Kindest Regards

Brent
 
I know the install project in VS.NET is very limiting. You might try
creating a custom action that will take that path and add it to the
registry.
 
Thank you for the suggestion. I created a custom action that calls a small
VB program I wrote, which accepts a command line argument (from the
Installer which passes the install folder via the [TARGETDIR] value as an
argument to the command line) and the small VB program then retrieves the
command line argument and updates the registry accordingly.

I am a happy chappy now :-)

Peter Rilling said:
I know the install project in VS.NET is very limiting. You might try
creating a custom action that will take that path and add it to the
registry.

Brent Shire said:
To anyone who is willing and able to help me!

I have developed a Windows application in VB .NET and wish to deploy it from
a CD using a typical install program. I have created a deployment project
in VS .NET, and all works as expected, except for one thing.

The requirement is that I need to record the folder selected by the user
during install as where the VB program application will be installed to,
into the registry key:
HKEY_LOCAL_MACHINE\Software\[Manufacturer]\InstallPath.

I have entered [TARGETDIR] into the Value field of a registry key I created
in the Registry Editor (within the set up project). But alas, when compiled
and executed, the literal string [TARGETDIR] is stored rather than the
actual folder name!

Surely I am not the first person who has this problem or needs this
requirement?

Kindest Regards

Brent
 
Back
Top