Reputation: 90465
%ProgramData%
%ProgramData%
optionHow to write to that folder?
Upvotes: 2
Views: 5553
Reputation: 102368
Check this out:
Specifying c:\ProgramData folder in Setup project?
string path = Environment.GetFolderPath(Environment.SpecialFolder.CommonApplicationData);
CommonApplicationData is C:\ProgramData
on Windows > Vista, and something like C:\Documents and Settings\All Users
on XP.
Upvotes: 1
Reputation: 55571
Actually this question is a duplicate. Here is the real way tell VDPROJ to deploy to that location:
Writing to AppData from a Setup & Deployment Project
But that will leave another problem: Standard Users won't have write privs to that directory. You'll either have to write a custom action to open it up or you'll have to use a better MSI authoring tool such as Windows Installer XML (open source) or InstallShield 2010LE ( free ) that has proper support for defining resource permissions.
Upvotes: 1