Using Visual Basic (and any combination of APIs), is it possible to see who (WINNT/WIN2K UserID) created a file on a file server or local hard drive? I would appreciate any information that you may have. Thanks! - Jeff Marler B-)
More like non-info. Wheather the file has a property of "created by" appears to depend on the app. Wheather the info is correct appears to be a function of how it arrived at the location where you investigate the porperty -and various other attritbutes/properties/.../...
Ther was a previous discussion on this in one of the VB or Ms Access (I THINK) forums within the previous six months. I do not recall enough detail to point to it specifically. I believe the word "Owner" or "Ownership" was used within the body of the duiscussion threads.
MichaelRed
mred@att.net
There is never time to do it right but there is always time to do it over
Michael,
Thanks for your response on this! Actually, every file (at least in the NTFS world) has an Owner property and for what I am looking for, the Owner property will suffice. In my hunting around, I found the following APIs on an MSDN article labeled "Finding the Owner of a File Object" -
Code:
GetSecurityInfo
LookupAccountSid
These APIs allow you to retrieve the SID for the owner of a file whose handle is passed into the API. Once you have the SID, you can use the LookupAccountSis API to get more information.
As I said, I just found these APIs and have not had any real chance to play with them yet, but I think that these might provide the data that I need. If you've used them before or if you have any insight into these, I'd love to hear it. Thanks again!
- Jeff Marler B-)
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.