Question

I’m trying to use a Visual Studio Setup Project to deploy a C# Application.

In a VS Setup project, is it possible to dynamically change the application folder before a project is installed, or even to add any code behind the set-up project at all?

What I am trying to achieve is an msi that runs, calculates the installation directory based on some external factors and then installs to that directory. I then want it to run the application immidiately. The objective for this is no user intervention throughout.

Was it helpful?

Solution

Edit: Seeing your amended question I think that you'll still want to look at a custom action but that you want to look at this msdn page instead. It's about changing the target location in various ways.

As 0xA3 says, the user can choose the target folder during the install.

Re your own code, you probably want to look at Custom Actions. You can write your own code in a DLL that can then be called from the Custom Actions.

This walkthrough is a good sample.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top