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 gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

script isse with net use * /d

Status
Not open for further replies.

flw

IS-IT--Management
Sep 13, 2007
52
Every once in a while I have a xp SP2 boxe that starts holding onto network connections. I have used "net use * /d" to delete any persistent connections that interferes with the mapping of drives.

Question is from the script, how can I automate the "y" in the verification question it asks? i.e. net use * /d /Y ????

Thanks for the script help. I would like it to run it every time to prevent this occasional but pain in the rear problem.
 
Check out the FAQ by the ever impressive markdmac:

faq329-5798
 
This will work on W2003/XP-Pro
login batch files.

NET USE * /DELETE /Y

 
Hello, I don't know if the NET USE */DELETE /Y works for you or not? It didn't work for me. So, I opened up the console and type in "NET USE /?" this shows the switches or options available for this command.

I use NET USE * /PERSISTENT:N
This tells it to NOT keep this as a persistent connection. I tested it in my BAT file. I changed it to persistent:n & then logged on. Good, it mapped the drive. Now,I changed my logon script & remarked out the net use command. I think you know what I mean by remark. I logged back into the client machine & the drive was no longer mapped. So, it did not keep it persistent - Just like I wanted!

Hope this helps.

---roystreet
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top