Solved

login scripts

Posted on 2009-03-30
3
244 Views
Last Modified: 2013-12-05
I run login scripts for users to map drives, etc.
I recently setup a new server and moved the network folders to the new server
I edited the logon scripts so the drives will map to the new server and not the old server, e.g. net use g: \\newserver\folder
When the user log ons, the logon will not map the new drive, because the computer already has the drive letter mapped to the old server and will not map the drive letter e.g. net use g: \\newserver\folder
Is there a command I need to put in the logon script to un map the old drive and then map with the new drive mapping?  
I want to use the same drive letters when mapping to new server, for users shortcuts, etc.
0
Comment
Question by:danberry1010
  • 2
3 Comments
 
LVL 7

Assisted Solution

by:Christopher Nienaber
Christopher Nienaber earned 250 total points
ID: 24023790
Hey Danberry in our organization we create a simple .bat file and use the following command to map a drive letter:

@echo off
net use o: \\server-name\sharename /y

We then run a logoff script that removes the network drives on logoff using the following command

@echo off
net use o: /delete /y

Do this for each drive letter you wish to remove and it should achieve the desired results

You can also try adding the two statements combined in the logon script with the netword drive deletion commands running first as shown below, this should delte any o connections and re-map to the new share location:

@echo off
net use o: /delete /y
net use o: \\server-name\sharename /y

Let me know how you make out :)


0
 

Accepted Solution

by:
danberry1010 earned 0 total points
ID: 24024069
Thats the solution.  Thanks!
0
 

Author Comment

by:danberry1010
ID: 24024089
solution provided
0

Featured Post

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

Welcome to my series of short tips on migrations. Whilst based on Microsoft migrations the same principles can be applied to any type of migration. My first tip is around source server preparation. No migration is an easy migration, there is a…
ADCs have gained traction within the last decade, largely due to increased demand for legacy load balancing appliances to handle more advanced application delivery requirements and improve application performance.
This video gives you a great overview about bandwidth monitoring with SNMP and WMI with our network monitoring solution PRTG Network Monitor (https://www.paessler.com/prtg). If you're looking for how to monitor bandwidth using netflow or packet s…
Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…

757 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

19 Experts available now in Live!

Get 1:1 Help Now