Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Which users on the network are accessing this file
Message
General information
Forum:
Visual FoxPro
Category:
Other
Environment versions
Visual FoxPro:
VFP 9 SP2
OS:
Windows Server 2012
Network:
Windows 2008 Server
Database:
MS SQL Server
Application:
Web
Miscellaneous
Thread ID:
01590340
Message ID:
01590381
Views:
67
>>>>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

I have cracked it in outline and have identified 6 machines which are in the application and 2 which are not - long way to go -
Specialist in Advertising, Marketing, especially Direct Marketing

I run courses in Business Management and Marketing
Previous
Reply
Map
View

Click here to load this message in the networking platform