Solved

login scripts

Posted on 2009-03-30
3
245 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

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

My previous article  (http://www.experts-exchange.com/OS/Microsoft_Operating_Systems/Server/Windows_Server_2008/A_4466-A-beginners-guide-to-installing-SCCM2007-on-Windows-2008-R2-Server.html)detailed one possible method to get SCCM 2007 installed an…
This is my 3rd article on SCCM in recent weeks, the 1st (http://www.experts-exchange.com/OS/Microsoft_Operating_Systems/Server/Windows_Server_2008/A_4466-A-beginners-guide-to-installing-SCCM2007-on-Windows-2008-R2-Server.html) dealing with installat…
Internet Business Fax to Email Made Easy - With eFax Corporate (http://www.enterprise.efax.com), you'll receive a dedicated online fax number, which is used the same way as a typical analog fax number. You'll receive secure faxes in your email, fr…
Learn how to create flexible layouts using relative units in CSS.  New relative units added in CSS3 include vw(viewports width), vh(viewports height), vmin(minimum of viewports height and width), and vmax (maximum of viewports height and width).

911 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

17 Experts available now in Live!

Get 1:1 Help Now