I built a Visual Studio installer (2010) installer installation project to deploy the main WinForms application, and I need my installer to create a couple of directories based on the OS in which it runs. For example, when the installer runs on Windows XP (and earlier), I need to create:
Application Folder\NewFolder
If the installer is running in Vista or later, I need to create a directory under the application data shared folder (i.e. C: \ ProgramData) as follows:
Common Application Data Folder\NewFolder
I see that I can add "Custom Folder" through View β "File System", but I'm not sure how to declare the DefaultLocation property for this new folder. The default value is [TARGETDIR], but I do not know how to specify the location of the directory that I want to create. Is it possible to do this using the Visual Studio Installer installation project or am I lucky?
source share