Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

net use command

Status
Not open for further replies.

butterfm

Programmer
Feb 15, 2002
132
0
0
GB
Hi,

I am running a net use command on win 2000 server to map a drive to a network share but when I do this it opens an explorer window. I have done the run the same command on other win200 servers but this doesn't happen.

Any ideas how to stop it happening. I have the net use command in a script but also need to run the

net use s: /D

command in the script to delete the mapping. This command fails because the explorer window is open.

I would be grateful if anybody could tell me how to switch this off.

Cheers, M
 
Could you post exactly the net use string that you are running?

To close the share run "net use * /DELETE /Y" it will force the close of the session. If you leave the wild card in there it will delete all mappings.
 
Thats sorted it out. The /Y switch was what I needed.

Many Thanks,
M
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top