get username on file changed?

  • Thread starter Thread starter news.microsoft.com
  • Start date Start date
N

news.microsoft.com

Hello, I want to create a program that will monitor the usage of a

particular file and record the date, time, and username of the person

who modified the file.

The FileSystemWatcher Class seems to be very useful for this purpose,

except that it does not provide username information.

Is there anyway I can extend this class to provide this username

information, or get the username by any other means? Such information

is available in "Computer Management" under "Open Files", so there must

be a way to get that information in Visual Basic.

Thanks for any help you might offer.

federico
 
Use what you have in conjunction with who is logged into the computer ?

Dim username As String = System.Environment.UserName()

Sets the username to be the current user logged in.
 
The file resides in a share, and the program would run on the server, so
there would be no user logged on the server where the program would be
running.

federico
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top