I'm working on a VS.NET 2003 Setup project. Its deploying a dll plugin and associated files for an app that should already be installed.

I need to change the default installation location depending on the version of the installed application. I originally was searching for a registry entry to find the root folder of the installed application, say "C:\Program Files\Company\Product" and the plugin would be installed at "C:\Program Files\Company\Product\Plugins\us\bin"

Unforunately, for earlier versions of the application (with which the plug-in is fully compatible) it should be installed under "C:\Program Files\Company\Product\Plugins\bin" (no "\us").

I can detect the version of the installed application based on the version in an executable (say product.exe) and set a property to true if the application is earlier than a given version. However, I can't figure out how to change the default Application Folder / TARGETDIR once I've got that.

Is it possible in VS.Net setup projects?