Reputation: 9080
I have a couple of issues right now. I think I would like to create an .msi for my application. However, all I can find it how to publish the application.
So my 1st question is: How can I setup an .MSI for my application distribution?
When I go through the publish wizard I can setup where the install files will reside but I really would like to setup where the actual application will be.
My 2nd question is: If I have to use the publishing feature, how do I setup where the actual program will be installed?
Just for some context for the 2nd questions - The user will be able to change the some text files that the app is reading from and I want to be able to direct the user to the right location. I would prefer to have a simple location versus some convoluted Microsoft location.
Upvotes: 2
Views: 226
Reputation: 17417
In order to create an MSI, you actually have to create a new project (New Project -> Other Project Types -> Setup and Deployment -> Visual Studio Installer). From here you can select which assemblies and other dependencies you want installed.
When you use the publishing wizard, you're actually creating a ClickOnce deployment. You have no control where files are installed and this is by design.
I would prefer to have a simple location versus some convoluted Microsoft location.
There is a good reason for the convoluted Microsoft location. User files should go in a user directory. Gone are the days when we could assume that the user was a superuser and had write permissions everywhere. It is also good practice to keep all application files in locations the installer is aware of, so that they can be properly uninstalled.
Upvotes: 1
Reputation: 2059
Q1 - the easiest way to generate a .msi package would be using a Visual Studio 2010 Setup Project or Setup Wizard (under Other Project Types -> Setup and Deployment -> Visual Studio Installer). You'd need to add a setup project to your solution. The setup project should give you enough flexibility in terms of the application installation location, etc.
Q2 - you don't have much control over the application installation location when using ClickOnce publishing and that's by design. My suggestion would be to write some custom code that would execute on your application startup and create/read the text files to/from the desired location.
Upvotes: 2