I have a Setup project that I have build using Visual Studio 2010.
The installer works fine in terms of installing the application and all its dependencies into thei
DirectoryInfo info = new DirectoryInfo(path[x]);
DirectorySecurity security = info.GetAccessControl();
security.AddAccessRule(new FileSystemAccessRule(logonName, FileSystemRights.Modify, InheritanceFlags.ContainerInherit, PropagationFlags.None, AccessControlType.Allow));
security.AddAccessRule(new FileSystemAccessRule(logonName, FileSystemRights.Modify, InheritanceFlags.ObjectInherit, PropagationFlags.None, AccessControlType.Allow));
info.SetAccessControl(security);
Setting the inherit part is also important if you want to save and access more than just one file in the ProgramData folder.