I\'ve a custom installer program that has worked fine, but it asks the user for admin permission every time it updates an application. I\'m creating a windows service that skip
I figured it out. I just needed to call,
file.SetAccessControl(access);
after the above. Apparently file.GetAccessControl passes back a copy of the access control and not the one that controls the file permissions for the file, until you call file.SetAccessControl with the modified permissions.
There's another caveat I discovered with another file that the service was creating in c:\ProgramData,