Thank you. Why do I have to put quotation marks "........."?
Main Topics
Browse All TopicsI changed the batch file to add more drives and also placed the batch file name in the logon script section for every user, but when users login to their PC they still have the old drives mapped.
Here is the example of the batch file:
net use g: \\server01\folder name
net use m: \\server01\folder name
net use r: \\server01\folder name
Please advise.
Thanks.
This Question has been solved and asker verified All Experts Exchange premium technology solutions are available to subscription members.
Experts Exchange has been collecting answers to technology questions since 1996…3 million and counting! If you have a question, chances are we already have your answer.
If you can't find the exact answer you're looking for, ask our exclusive community of 50,000 experts. You’ll get a personalized answer from a trusted professional.
Thousands of free tech tips, tricks, how-to’s and tutorials are available in our peer reviewed articles section. See for yourself how smart our experts are, no login required.
Access the answers to your technology questions today.
30-day free trial. Register in 60 seconds.
Members of the expert community talk about why the experience at Experts Exchange is different than what you will find anywhere else.

Try it out and discover for yourself.
30-day free trial. Register in 60 seconds.
Join the community of experts here and help other tech pros by answering question in your area of expertise. You can earn FREE access to all Experts Exchange's premium features and resources.
Yes. The UNC path exists. All I did was I changed the server name because I migrated folders to another File Server. I did not want to delete old connections because I already made the script with the right connections. So some users typed Yes during the prompt and the old mapped drives were disconnected, which is not what I wanted to do. I wanted users to connect to the old and new mapped drives that I specified in the batch file.
This script did not work they way I wanted it.
net use * /delete
net use g: "\\server01\folder name" /p:n
net use m: "\\server01\folder name" /p:n
net use r: "\\server01\folder name" /p:n
I also do not want users to get this prompt every time they log in. But that what happened when I used this script.
Please advise me on another way to seamlessly map new drives and disconnect the old ones as I migrate folders one by one.
Thanks.
If that still doesn't work, you must debug. run the script after you are logged in from a command prompt (double clicking it won't tell you anything as it will scroll by and disappear before you can read anything). Map a drive to the server's NETLOGON share, then run the script from a command line and post a screen shot - some kind of error should be given and we can continue from there.
You didn't mention CITRIX before. Describe in a little more detail, your network set up.
Your batch file should be fine in a regular Windows based network. Just make sure the machines are hitting the batch file on login. GPO can be crazy if you are working in one policy and another policy is also trying to control the situation from a different angle. I had that issue when an errant policy was running from way out in la la land. A real pain to track down sometimes.
1. Test your batch from a command prompt and make sure it works locally.
2. Make sure no other policy is running a login script for the machines.
3. Consider making this a machine policy instead of a user policy.
Just some basic suggestions. You should see the problem pop up on you in one of those steps. The only outside influence is not knowing what CITRIX is doing.
Business Accounts
Answer for Membership
by: leewPosted on 2009-06-14 at 17:57:11ID: 24625826
net use * /delete
That command should disconnect all pre-existing connections
Then to prevent remembered connections from causing problems in the future, add /p:n at the end of each net use line (Persistent:no)
net use * /delete
net use g: "\\server01\folder name" /p:n
net use m: "\\server01\folder name" /p:n
net use r: "\\server01\folder name" /p:n