Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

My program has been "published", how can I change the installation path?

I "published" my C# solution in Visual Studio 2008 to C:\Deploy. When I run the setup.exe program, it installs my program to C:\Documents and Settings\Kevin\Start Menu\Programs\MyProgram

Is there any way, within Visual Studio, to set a custom install path? For instance, what if I wanted my program to install to C:\Program Files\MyProgram?

like image 214
Kevin Avatar asked Apr 28 '10 09:04

Kevin


People also ask

What is installation directory path?

The installation path is the folder, relative to your domain name's document root folder. For example, if the installation path is “/” this means that your website will appear when someone types in yourdomain.com in their browser.


1 Answers

Publishing uses ClickOnce for deployment. ClickOnce has the advantage that it's easy to install and update, and doesn't require the user to have administrator privileges to install your application.

If you'd like a more traditional next-next-next-next-finish installer, which also allows the user to specify the target folder (and for you to set/force a default one), add a "Setup Project" to your solution by clicking File >> Add >> New Project..., in the tree select Other Project Types >> Setup and Deployment and double click Setup Project. When you build the setup project, it create an MSI file (Microsoft Installer setup file) and a bootstrapper EXE file (in case the user doesn't have Microsoft Installer or the required .NET Framework, which it then installs automatically).

like image 71
Allon Guralnek Avatar answered Sep 24 '22 12:09

Allon Guralnek