AnsweredAssumed Answered

vrf Finding file owner

Question asked by rsb on Apr 30, 2004
"Shawn Fessenden <> wrote:
> Stan,
> Compatibility:
>   VEE 5 & up.
>   Win32, NTFS partitions.
> > How do I programmatically (.NET preferrably)
> > determine the owner of a given file?
> Well, I kinda sorta succeeded, but not really. I found a HOWTO article about
> getting a file's owner account name. The original is VB. The attached is a
> VEE 5 translation of the source code published in the article. The trouble
> is it doesn't seem to get the owner but rather the owner's group
> affiliation.
> I double checked everything and it's ok. I went and pasted the published
> code into VB and it works the same way. I don't quite know what the story
> is, but I do know that NT security is one twisted subject. I'm not real sure
> what's going on but it may be because of my setup. I pointed it at a file I
> created under my login and it simply returns "Administrators" for the
> account and "BUILTIN" for the domain. I was expecting "Shawn" and "ALGOL".


Works fine for me- thanks Shawn.

When I point this at a file I created as me it says I am owner.
When I point at a file created by an admin, it lists that correctly

The only weirdness I see is when I point at a shortcut, in which
case it returns 'administrators' regardless of who owns the shortcut.

How do you get the "domain"?

I'm running XP


Stan Bischof  Agilent Technologies  707-577-3994

You are currently subscribed to vrf as:
To subscribe send a blank email to "".
To unsubscribe send a blank email to "".
To send messages to this mailing list,  email "". 
If you need help with the mailing list send a message to "".