Windows Develop Bookmark and Share   
 index > ClickOnce and Setup & Deployment Projects > Setup Project - How to set custom target directory
 

Setup Project - How to set custom target directory

We have a DLL project that extends an installed product. The installed application has a registry key that points to its own /Bin directory:

HKLM/Software/MyCompany/MyApplication - Key=ExePath Value="Progra~1/MyApplication/Bin"

What we would like to do is take that registry value, remove the /Bin and interpose something different:

Progra~1/MyApplication/Extensions

However, the .Net Setup Project has no method for manipulating this value either directly or via a Custom Action. This needs to be automatic because different versions of the "MyApplication" may have slightly different target directory structures.

In my searches, it looks like the only access I have for doing this kind of thing is using C++ and acting on the Msi handle or switching to use one of the third party installers out there like InstallShield or Wise.

Any ideas?
Warpfield  Thursday, August 13, 2009 11:05 PM
If you can't use that exact path as returned from the search then yes, you're correct, you can't run code (like a custom action) before the install to set folders etc.
Phil Wilson
PhilWilson  Monday, August 17, 2009 11:15 PM
You can do this with:
1) A Search Target Machine (in LaunchConditions) that searches for the registry path and stores it in a property.
2) A Custom folder where the Property is the name of your search property.
Phil Wilson
PhilWilson  Friday, August 14, 2009 7:30 PM
Thats the issue. We do use a Search Target Machine - Registry value:

(Name)= ACLocation
Property = ACLOCATION
RegKey = Software\Kofax Image Products\Ascent Capture\3.0
Root = vsdrrHKLM
Value = EXEPATH

This registry value will be something like this:

C:\Program Files\AscentSS\ServLib\Bin

I really need to use this registry value because it could be different depending upon the specific installation of the main product, i.e.:

C:\Program Files\Ascent\ServLib\Bin
D:\AscentSS\ServLib\Bin
etc...

What I want to do is get this value, remove the "Bin" off the end and interpose something like, "Cap\MyApp", producing an install target like this:

C:\Program Files\AscentSS\ServLib\Cap\MyApp

So far, I haven't been able to find a way to do this within the .Net Setup Deployment Project.
Warpfield  Friday, August 14, 2009 9:34 PM
If you can't use that exact path as returned from the search then yes, you're correct, you can't run code (like a custom action) before the install to set folders etc.
Phil Wilson
PhilWilson  Monday, August 17, 2009 11:15 PM
That's unfortunate. I was rather hoping there was some back door method for doing this.Thank you for your help.
Warpfield  Tuesday, August 18, 2009 2:37 PM

You can use google to search for other answers

Custom Search

More Threads

• Application download did not succeed
• need to copy files to the system32 folder.
• SQL Server 2008 Express as prerequisite
• Need help determaining Vista OS during a VS2005 .msi deployment
• C# custom setup
• Can run CustomAction under user account
• Choosing file location upon installation
• Command line arguments from setup.exe to bootstrapped installer
• Build Clickonce deliverables once and Deployed universally - Help please
• block automatic ClickOnce Update dialog