Visual Studio 2013 Installer Projects Extension copying to root folder

227 views Asked by At

I have installed Microsoft Visual Studio 2013 Installer Projects to create a simple installer. When I run the installer however it copies the files to c:\ instead of the proper folder in Program Files (even though it asks for the path).

This seems to be caused by the fact that the MSI (the only thing produced by the Installer project) is not run with elevated privileges. The other thing is that you cannot say run as administrator for MSI file (unless you do some reg-hacks).

I have searched for a solution and there seem to be loads of more or less complicated ways how to tackle this.

The question is - is there not a simple switch that would allow me just to copy the files to appropriate Program files folder? I do not want to create workarounds for something that seems to be the very basic functionality.

1

There are 1 answers

0
Alex X. On

If adjusting the environment (UAC settings, Registry values) is totally not an option for you then maybe you could try one of the following:

  1. The Visual Studio Setup Project produces both an MSI and a setup.exe file. The latter one you can run as administrator by right-clicking on it. No hacks.
  2. Another way of starting a process with elevated privileges is opening a command prompt (cmd) as administrator and then launch your EXE or MSI from the command prompt window.

-

Note: Even though it may not be related to your question, I would also pay attention to the Target Platform. For instance, you cannot install a 64-bit project to the Program Files (x86) folder.