Author Topic: get username of last to modify file  (Read 3273 times)

0 Members and 1 Guest are viewing this topic.

uncoolperson

  • King Gator
  • Posts: 4430
  • Doing everything in metric inches!
get username of last to modify file
« on: May 19, 2006, 03:25:03 PM »
trying to get the last user to modify a file to go with the date... but i'm having issues trying to come up with the username of the last user to modify a file

any ideas....
« Last Edit: May 19, 2006, 03:54:43 PM by uncoolperson »
when all else fails On Error Resume Next
-----------------------
Livin like I'm on borrowed time
-----------------------
Searching for the Ballmer Peak

uncoolperson

  • King Gator
  • Posts: 4430
  • Doing everything in metric inches!
Re: get username of last to modify file
« Reply #1 on: June 15, 2006, 03:41:56 PM »
so i was thinking yesterday... you know what this thing is missing


when all else fails On Error Resume Next
-----------------------
Livin like I'm on borrowed time
-----------------------
Searching for the Ballmer Peak

CmdrDuh

  • Automatic Duh Generator
  • King Gator
  • Posts: 4039
Re: get username of last to modify file
« Reply #2 on: June 15, 2006, 03:51:17 PM »
what about capturing the username on exit, then the next person in can read that value, and when they exit, it would update to the value
Everyone has a photographic memory, Some just don't have film.
They say money can't buy happiness, but it can buy Bacon and that's a close second

uncoolperson

  • King Gator
  • Posts: 4430
  • Doing everything in metric inches!
Re: get username of last to modify file
« Reply #3 on: June 15, 2006, 04:17:12 PM »
about 75% of our users are lt...

and this is an executable, and i'm trying to keep the functionality for all file types
when all else fails On Error Resume Next
-----------------------
Livin like I'm on borrowed time
-----------------------
Searching for the Ballmer Peak

Bob Wahr

  • Guest
Re: get username of last to modify file
« Reply #4 on: June 15, 2006, 04:22:13 PM »
Echos of B3 If you can get it, it's stored in the file somewhere if you can find it.  How was that for absolutely no help whatsoever?

uncoolperson

  • King Gator
  • Posts: 4430
  • Doing everything in metric inches!
Re: get username of last to modify file
« Reply #5 on: June 15, 2006, 04:27:16 PM »
when all else fails On Error Resume Next
-----------------------
Livin like I'm on borrowed time
-----------------------
Searching for the Ballmer Peak

Bob Wahr

  • Guest
Re: get username of last to modify file
« Reply #6 on: June 15, 2006, 04:31:13 PM »
It was a project in another place and time called Byte By Byte (BBB, B3) in which Randall Rath was trying to teach a few brave and intelligent people how to get the information they needed from drawing files without the need of opening the drawing files.

uncoolperson

  • King Gator
  • Posts: 4430
  • Doing everything in metric inches!
Re: get username of last to modify file
« Reply #7 on: June 15, 2006, 04:32:18 PM »
few brave and intelligent people

yup, not me

*runs and hides, with my blankie*
when all else fails On Error Resume Next
-----------------------
Livin like I'm on borrowed time
-----------------------
Searching for the Ballmer Peak

Bob Wahr

  • Guest
Re: get username of last to modify file
« Reply #8 on: June 15, 2006, 04:32:58 PM »
me either

uncoolperson

  • King Gator
  • Posts: 4430
  • Doing everything in metric inches!
Re: get username of last to modify file
« Reply #9 on: June 15, 2006, 04:35:54 PM »
Code: [Select]
FileInfo thefile = new FileInfo(file);

FileSecurity FileSec = new FileSecurity(file, AccessControlSections.Owner);

NTAccount ownerobj = (NTAccount)FileSec.GetOwner(Type.GetType("System.Security.Principal.NTAccount"));

string modifieduser = ownerobj.Value.Substring(ownerobj.Value.IndexOf("\\") + 1);


so far what i have is this, might just have to go with it...
when all else fails On Error Resume Next
-----------------------
Livin like I'm on borrowed time
-----------------------
Searching for the Ballmer Peak

Bob Wahr

  • Guest
Re: get username of last to modify file
« Reply #10 on: June 15, 2006, 04:37:08 PM »
If I remember correctly, the Australian contingent (Kerry Brown, MickD, GlennR), Cornbread, and Hatch (who sadly has never appeared here, I can't find his email address so if anyone has it, shoot him an email) were all playing along.  I did a lot of thread reading with glazed eyes and a slack jaw, saying, "whuh?"