How to retrieve Owner or Creator of a file or a resource

  • Thread starter Thread starter Guest
  • Start date Start date
It is possilbe in .NET 2.0 but not 1.x.

However, this link, http://www.devx.com/vb2themax/Tip/19292, has some VB6
code that uses few Win32 APIs to get the file owner. Perhaps you can try
the equivalent in .NET as well. I have not tried this code though.

Is there a way to get owner of a file or a resource with .Net classes ?
 
Add System.Management in your references and do a search on the net for WMI.
The WMI namespace you need is "Win32_LogicalFileSecuritySetting" which will
give you access to information on the file for who owns it (your can also
change ownership using "CIM_DataFile")

Chris
 
Back
Top