Link to home
Start Free TrialLog in
Avatar of Jim P.
Jim P.Flag for United States of America

asked on

Delete a NET USE to a specified server

When I do a NET USE it returns something like this:

Status       Local     Remote                    Network
-------------------------------------------------------------------------------
OK                     \\10.101.194.32\apps      Microsoft Windows Network
OK                     \\10.101.194.32\customers Microsoft Windows Network
OK                     \\10.101.201.28\C$        Microsoft Windows Network
                       \\TSCLIENT\C              Microsoft Terminal Services
                       \\TSCLIENT\D              Microsoft Terminal Services
                       \\TSCLIENT\F              Microsoft Terminal Services
                       \\TSCLIENT\G              Microsoft Terminal Services

Open in new window


I'm working in an Access database and want grab files from or push files to a file server (the \\10.101.194.32 -- call it PrimeSrvr) in a different domain on the local network. But I will never be sure if the user has already authenticated or connected to the PrimeSrvr on any given day or an particular share.

So I what I want to do is delete all the connections to PrimeSrvr, but leave any others in place, such as the \\TSClient in or the connection the other computer's admins share (the \\10.101.201.28\C$).

I know there is the NET USE * /DELETE, but that would wipe them all out. I just want to wipe out the PrimeSrvr ones only and the re-authenticate so I know I can grab the files I need.

Anyone have suggestions?
SOLUTION
Avatar of Ogandos
Ogandos
Flag of Canada image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Jim P.

ASKER

I'm trying to do this programmatically  from an MS Access DB. I won't know what shares are connected.
ASKER CERTIFIED SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Jim P.

ASKER

It looks like it should work. But I go pulled of to other tasks.