This tip will explain how to restrict a user from changing installation folder selection while deployment of Visual Studio .NET application setup.
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:
Then go to Setup and right click it.
Go to view->User Interface-> click on it.
It will display this:
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:
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.