Question Get a list of open shared file

Zexor

Well-known member
Joined
Nov 28, 2008
Messages
520
Programming Experience
3-5
In Computer Management, if i click Shared Folders, Open Files, it list all the share file that is opened. How do i get that list into vb?
 
So you can change Filename and Arguments for Net Use ?
 
"net file", which is net and file :)
 
that doesnt show the open share files. it only show a disconnected network computer in the network
 
that doesnt show the open share files. it only show a disconnected network computer in the network
Net use is for shares, see Net file
Displays the names of all open shared files on a server and the number of file locks, if any, on each file. This command also closes individual shared files and removes file locks. Used without parameters, net file displays a list of the open files on a server.
I tried using openfile to read it but this doesnt seem to work either
Any way you choose you must of course have admin privilegies, that means you must run app as admin. To run app as admin when debugging you must run VS as admin.
 
Ok that list 3 files open but i dont know what they are, it only show the beginning of the path then ..... but i only have 1 file opened. Openfiles show the 1 file open. At least this tell me there is open file or not.
 
Ok it was working earlier. Dont know why its not working now. it return nothing. hmm All i did was overrided the srvnet. but even after i cancel the override it still give me nothing. oh i forgot to run it as admin. hmm then i have to run my program as admin too. Is there a way to run my auto start program as admin without clicking that annoying yes no prompt? I try to edit the app.manifest file but then it say clickOnce does not support requireAdministrator
 
Last edited:
Back
Top