Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations biv343 on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Who Created a File

Status
Not open for further replies.

jmarler

Programmer
Jan 29, 2001
679
US
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-)
 
jmarler,

You're TOO YOUNG (and I'm to **&*(@^$)*JNOQW*&! OLD) to be up this late!!!! Go to BED/SLEEP and look at it in the morning!!!

MichaelRed
mred@att.net

There is never time to do it right but there is always time to do it over
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top