>Hello All, I have written a Windows Service which consists of a FileSystemWatcher monitoring some network folders, on creation of a new file or deletion of an existing, a record is inserted into a SQL table ( all works very well ). What I would like to have , is , the userid of the person who created (or deleted ) the file ( not the original creator in the case of a deletion - but the person who deleted it). As this service runs on a server I always get the userid of the server user (Administrator) I don't know if this is possible but thought I'd ask.
Windows doesn't record this info so there isn't any easy way of doing this. If you really need to track this, you can look at writing a File System Filter Driver.
http://www.microsoft.com/whdc/driver/filterdrv/default.mspxOr, if you have more control over the file creating/deletion you could write their user info out when it occurs, Or, if the doc. types embed extra info (for example, a Word doc) you might be able to extract it from there.