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?
 
I don't get any errors in Win10, but I also can't test for results since I don't have any shares in use.
 
There aren't any in Computer Management on my machine, so for me that is not a negative result, but I wouldn't know how to test otherwise either with only one machine in network.
 
open Process as in this?
Dim Processes As Process() = Process.GetProcesses()

Can you get the result of the openfiles.exe or the PsFile into vb values?
 
Last edited:
Don't understand. Set 'net' as Filename, 'use' as Arguments you mean?
 
you set Other options is to open Process for 'net file', redirecting standard output and parsing the text.
how do i get the net files?
 
Did you see the code example in documentation page (post10) ?
 
you mean the

Dim compiler As New Process()
compiler.StartInfo.FileName = "vbc.exe"
compiler.StartInfo.Arguments = "/reference:Microsoft.VisualBasic.dll /out:sample.exe stdstr.vb"
compiler.StartInfo.UseShellExecute = False
compiler.StartInfo.RedirectStandardOutput = True
compiler.Start()

Console.WriteLine(compiler.StandardOutput.ReadToEnd())

compiler.WaitForExit()
 
Back
Top