← All Articles

Deploy files to ProgramData folder in a VisualStudio Installer

Khash SajadiKhash Sajadi
Oct 31st 11Updated Jul 27th 17

Windows “special folders” are a mess. Each version of Windows uses different locations for these folders. This can cause issues when trying to use these folders in your .NET code.

VisualStudio MSI deployment projects support some of these special projects, however ProgramData (a new folder for storing application data in Windows Vista, Windows 7 and Windows 2008) is not supported in VisualStudio (yet, VS 2010).

To deploy a file to this folder, create a “Custom Folder” from the special folder menu, set its name to anything you fancy, but set the following two parameters like this:

DefaultLocation = [CommonAppDataFolder]\

(note the [] in the first line)

Try Cloud 66 for Free, No credit card required