>>>I need to be able to fun a routine on on the network asking who on the network has a specific file open (say invoicefile)
>>>
>>>I need to know the user name and the login name of each machine using this file (ie the sort of information I would get with sys(0)
>>
>>To get it interactively is easy;
>>Go to mycomputer>manage
>>Then connect to server machine (rightclick>connect to other computer + machine name)
>>
>>When connected to server machine go to
>>SharedFolder>OpenFiles
>>
>>Find your file in list of open files
>>
>>Now from within app is more difficult. Perhaps someone else will jump in with solution for this;
>>
>>HTH
>
>Thanks for that - but I have 15 machines on the network and I need to be able to identify a user on any of them in an app
I think that was about the best answer you will get
You can fiddle with some api
(1) WNetAddConnection2
(2) LogonUser
(3) ImpersonateLoggedOnUser
(4) NetFileEnum
But it's a long way and at the end of the day you'll find that you can only identify the user.
If the user is logged on from one PC - you know the PC
If the user is logged on from several PCs - you cannot tell which one has the file open
Gregory