How do I set the default install path when deploying a program using a windows installer.
-
*How* depends on what technology you're using to build the installer, but yes, it will be possible to set the default install path. – Damien_The_Unbeliever Nov 15 '11 at 15:05
-
aha think i may of found the property – user589195 Nov 15 '11 at 15:06
-
windows installer is a technology, part of windows, that consumes msi databases and uses those to install applications. The important technology to know about is the one that you're using to construct an MSI database - WiX, InstallShield, Visual Studio Setup Project (ugh), to name a few. – Damien_The_Unbeliever Nov 15 '11 at 15:09
-
visual studio but I think i found the property – user589195 Nov 15 '11 at 15:09
-
currently set to [ProgramFilesFolder][Manufacturer]\[ProductName] Where is it pulling those params from? – user589195 Nov 15 '11 at 15:10
1 Answers
In a Visual Studio Setup project, you control the default install path by setting the DefaultLocation
property of the Application Folder
folder, within the File System
Editor.
This, in turn, as you've found, defaults to [ProgramFilesFolder][Manufacturer][ProductName]
. You can either replace this property entirely (you should keep [ProgramFilesFolder]
, at the very least though), or you can modify these properties.
[ProgramFilesFolder]
is built in, and correctly leads to the Program Files directory on the target machine, no matter how customized the setup of Window is. The other two properties are properties of the setup project (select the Setup project in Solution Explorer, and examine the properties grid to find them). These default to the company name you supplied when installing Visual Studio, and the name of the Setup project.

- 267
- 3
- 12

- 234,701
- 27
- 340
- 448
-
2its the program files bit i want to get rid of. I want to install in the folder above the program files directory. ie C:\Manufacturer – user589195 Nov 15 '11 at 15:41
-
18You can eliminate it, but it's strongly not recommended by Microsoft. How do you know whether the machine you're installing on even has a C drive? You might try `[WindowsVolume][Manufacturer]`, but I'm not sure it will work. Here's the [documentation](http://msdn.microsoft.com/en-us/library/windows/desktop/aa370905(v=vs.85).aspx#system_folder_properties) for the standard installer properties. – Damien_The_Unbeliever Nov 15 '11 at 15:52
-
Do not install directly to the `WindowsVolume`. This is intentionally made hard to achieve because nothing should be installed there in the first place. This is not some fixed idea, these are Windows application design guidelines. Future OS upgrades could cause binaries here to refuse to launch - for example. – Stein Åsmul Nov 22 '18 at 19:31