Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Default Location to System Drive in Setup and Deployment Project

I have a setup and deployment project in Visual Studio 2010

The default location of Application Folder is set to C:\[Appname]

The problem is that if there is no drive C: in the machine the app is being installed, the installer will crash with an error "'xxxxxxxx' is not a valid file name" or something similar, because the installer verifies the location before the user has a chance to set the actual application installation folder. (so the default location is validated and since drive c: is missing it throws this error)

You can set the location to something like [ProgramFilesFolder]\[AppName] etc..

I would like to know what is the "macro" for the system's windows drive! I would expect something like [WindowsDrive] or [SystemDrive] or something like that so that I could set the default location to [SystemDrive]\[Appname], for instance!

Does anybody know?

like image 460
Thanasis Ioannidis Avatar asked May 27 '13 13:05

Thanasis Ioannidis


People also ask

How do I change the default installation directory in a project?

You can change the default install location for the file folder in the File System view of your setup project. In the properties it's the "DefaultLocation" property. The 2704 error occurs mostly when DefaultDir was set wrong in the Directory table of a MSI file.

Where is Visual Studio installation path?

The \Microsoft\VisualStudio\Shared directory is where Visual Studio stores the files that are shared by side-by-side Visual Studio installations. SDKs and tools are also stored in this directory.

How do I change shared components tools and SDKs location?

If you've already installed it and want to change the location, you must uninstall Visual Studio and then reinstall it. In the Shared components, tools, and SDKs section, select the folder where you want to store the files that are shared by side-by-side Visual Studio installations.

Can Visual Studio be installed on D drive?

No, unfortunately most of Visual Studio still gets installed on the main drive. Regarding to this forum thread 75% of VS gets installed on the main drive and just 25% on the chosen drive. So you have no choice but to make space on your c drive.


1 Answers

I think http://msdn.microsoft.com/en-us/library/aa372057.aspx contains the info you are looking for(for .NET 3.5, other frameworks may differ).

like image 129
Paul Steane Avatar answered Sep 18 '22 17:09

Paul Steane