S
sirpooky
Hi All,
I have a file system watcher on a remote machine. When people create files/folders on the remote machine I need to see which user was responsible. As there are a number of users who are admins often when a file is created the following code shows BUILTIN\Administrators
FileSecurity acl = File.GetAccessControl(e.FullPath);
NTAccount user = (NTAccount)acl.GetOwner(typeof(NTAccount));
string UserName = user.Value;
I know there is a way to get the Domain\USerName of the user but I cant for the life of me remember. Anyone?
- Paul C
I have a file system watcher on a remote machine. When people create files/folders on the remote machine I need to see which user was responsible. As there are a number of users who are admins often when a file is created the following code shows BUILTIN\Administrators
FileSecurity acl = File.GetAccessControl(e.FullPath);
NTAccount user = (NTAccount)acl.GetOwner(typeof(NTAccount));
string UserName = user.Value;
I know there is a way to get the Domain\USerName of the user but I cant for the life of me remember. Anyone?
- Paul C