Click here to Skip to main content
65,938 articles
CodeProject is changing. Read more.
Articles / .NET

Visual Studio Deployment Setup: Disable Installation Folder Selection Dialog

4.78/5 (5 votes)
8 Aug 2012CPOL1 min read 46.5K  
Visual Studio deployment setup: disable installation folder selection dialog

Introduction

This tip will explain how to restrict a user from changing installation folder selection while deployment of Visual Studio .NET application setup.

Background

Your Web site is using some files which you want to get installed on clients computer and want to access it. Maybe you want to put your installation folder at some specific location because maybe any other application(website) is going to use files and folder from your installed setup.

You have another option to search for a specific folder but this is the easier one if you force to install it on a given static directory or drive.

Using the Code

Make a setup of your project first.

Then go to the Application Folder and set your static path:

Image 1

Then go to Setup and right click it.

Go to view->User Interface-> click on it.

Image 2

It will display this:

Image 3

Then delete the installation folder from install and administrative install both.

Then build it and install it. It will not ask user for installation path.

If you want to display a default path to user for his information, then you can add the path in welcome text like this:

Image 4

Points of Interest

Now you don't have to change path from your other application (website) for accessing folders which are installed.

You can also go through this article for more details on deployment.

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)