Hi,
Many many months ago I looked for the same thing and asked in various forums for guidance. Almost every response was either irrelevant or ended up with Vista UAC bashing.
I have only recently felt comfortable with all the hoopla in regards to Vista and the UAC and can see where MS are/were coming from.
The white paper you are looking for consists only of one or two lines and can be condensed even further....
Previous to Vista, the All Users data folder was writable by all. Since Vista, it is not. The same applies to the Registry.
There you go - your white paper. [I can't help to make a swipe at someone here - IA would actually publish that and get snotty if anyone complained
]
Now I can't help you with how MS manages it's UAC features but I guess they virtualize everything so they can return the status quo if necessary.
I can tell you how I resolved the problem of using the All Users data folder the same way in Vista as I did before Vista. After testing to see if the user OS was indeed Vista I called the following and passed in the appropriate directory. The program that includes this code must be running with elevated privledges.
#region Process - Set Vista Permissions
private void setPermissions(string dir)
{
if (dir.EndsWith(Path.DirectorySeparatorChar.ToString()))
{
dir = dir.Remove(dataDirectory.Length - 1);
}
//in spanish builtin\Usuarios.. If your culture is important , not all builtin users are specified in English so use the SID instead...
SecurityIdentifier sid = new SecurityIdentifier(WellKnownSidType.BuiltinUsersSid, null);
NTAccount acct = (NTAccount)sid.Translate(typeof(NTAccount));
try
{
DirectoryInfo info = new DirectoryInfo(dir);
DirectorySecurity ds = info.GetAccessControl();
ds.AddAccessRule(new FileSystemAccessRule(acct,
FileSystemRights.FullControl,
InheritanceFlags.ObjectInherit |
InheritanceFlags.ContainerInherit,
PropagationFlags.None,
AccessControlType.Allow));
info.SetAccessControl(ds);
logger.Fatal("Set Vista access rights successfully");
}
catch (Exception ex)
{
logger.FatalException("Failed to set Vista access rights : ", ex);
}
if (!Directory.Exists(@"C:\Windows\Microsoft.Net\Framework\V2.0.50727\Temporary ASP.NET Files\"))
{
try
{
Directory.CreateDirectory(@"C:\Windows\Microsoft.Net\Framework\V2.0.50727\Temporary ASP.NET Files\");
logger.Fatal("Created ASP.NET temp directory");
}
catch(Exception ex)
{
logger.FatalException("Unable to create ASP.NET Temp directory: ", ex);
}
}
The ASP.Net bit at the end is because when I enabled IIS6 in Vista the directory wasn't created.
I do have a separate configuration program that ammends the Registry where required but I figured that the UAC really wasn't a bad idea when it came to playing with the registry so I amended the manifest created by VS2008 requiring extra privledges to run. At least the end users can decide who's going to stuff things up instead of me automating it for them
.
After including the above, I have been able to virtually forget about the Vista woes and code without worrying about OS..
The short answer to your question is therefor - "The same place as before."
Glen Harvy.