Search code examples
windowsvisual-studiowindows-installer

Add folder in C:\\ with Microsoft Visual Studio Installer


I have created a program that needs to have DLLs in the C:\ folder. I have also created an installer using "Microsoft Visual Studio 2017 Installer Projects", but I would like it to create the folder C:\Subfolder with its files when it installs.

How can I do this? Thank you!


Solution

  • If you use MSI / Windows Installer to install your package, then installing directly to C:\ is intentionally made difficult. There are almost no valid reasons to install directly to C:\. If at all possible install your application to Program Files (64 bit files) or Program Files (x86) (32-bit files) on your system drive. There are ways to force an MSI to install directly to C:\, but no good ways. A long rant about it here (and how to do it with WiX).

    "Microsoft Visual Studio 2017 Installer Projects" are rather limited, there are many alternative tools you can use. Some are free, some are commercial, and some of the commercial ones feature some free functionality:


    Some Additional Links: