How to programatically obtain NET VIEW results

D

DBSmith

I'm trying to programatically (within Access) issue a Net View command. I
need to obtain and manipulate (for example display in a list) the resulting
list of machines on the network. Issuing a Shell("Net View > pcnames.dat")
does not redirect the results to a file.

Thanks

[email protected]
 
R

Rick Brandt

DBSmith said:
I'm trying to programatically (within Access) issue a Net View command. I
need to obtain and manipulate (for example display in a list) the resulting
list of machines on the network. Issuing a Shell("Net View > pcnames.dat")
does not redirect the results to a file.

You can create a batch file that issues the command with a file redirect
and then use shell to execute the batch file.

(Odd that the redirect directly in the shell command doesn't work though)
 
T

Tim Ferguson

I
need to obtain and manipulate (for example display in a list) the
resulting list of machines on the network

Wouldn't the scripting Network object be easier:

Set wshNetwork = CreateObject("WScript.Network")

collDrives = wshNetwork.EnumNetworkDrives


and so on.

Hope that helps


Tim F
 
Top