Solved

Need script to replace %oldservername% mapped drives with %newservername% Server 2003

Posted on 2004-10-07
7
210 Views
Last Modified: 2010-04-17
Hi all
I just need a script to replace all %oldservername% mapped drives to new %servername% mapped drives persistently. Can anyone help please?
Regards
chillinlong
0
Comment
Question by:chillinlong
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 4
  • 3
7 Comments
 
LVL 41

Expert Comment

by:graye
ID: 12255308
I've got a solution that quite a lot more complicated than that...  but you might find bits of it helpful (or at least amusing)

In my case, I had to rename all of my PCs and Servers.  That meant that I had a few hundred PCs that needed the following:

0
 
LVL 41

Expert Comment

by:graye
ID: 12255347
...hey I didn't mean to hit Enter (so let me continue!)

That meant that I had a few hundred PCs that needed the following:

a) needed to be renamed
b) needed all mapped network drives/printer changed for all users on each PC (they are a per-user setting)
c) needed all of the shortcuts changed (where ever they are on the PC)
d) needed a registry "search and replace" for such things as installed software paths, etc.

So, I created a VB.Net program that runs at the login batch file... that does all of those things.  It uses a database of "before and after" names of servers (and ordinary PC that have file or print shares) to do it's magic.

The entire package is available at http://www.dpw.hood.army.mil/ftp/ReNamePCs and contains the VB.Net source code, overview, documentation, sample database, etc.   It does NOT include the actual program itself... you'll have to get someone with VB.Net to compile the program for you.

Hey, I'll admit... it's a bit of overkill for what you're asking, but  you're welcome to take a look, and use whatever you like.
0
 
LVL 1

Author Comment

by:chillinlong
ID: 12257475
Thanks for your input, it just seems a bit too much for the mapped drives to reconnect to a new server to have too install .net functions on all client machines to just run the script etc.

Preferably I need a small vbs script which will disconnect
%oldservername% to and edit to %newservername% only on mapped drives and persistent connection.

Thanks again for your help.

0
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 41

Accepted Solution

by:
graye earned 100 total points
ID: 12257732
Yeah, I kinda thought that might be the case...  Oh well.

So, are you sure you don't have PCs that have shortcuts scattered about their drives that point to the old server?

Also, remember that mapped drive letters are stored in the registry for each user on the PC... so if you have a shared PC, you'll have to fix the mapped drives for each user.  That's the part of the solution that's tought to do with a script... it'd be difficult for a script to mount all of the user's registry "hives" so that the script could fix the mapped drives.  The alternative would be to run the script for each user that logs on.

You guys don't already have the .Net Framework installed on your client PCs ?!?!?!

Hey, I'm not trying to convince you of anything... just pointing out the pitfalls of what seems to be a simple problem with a simple solution.
0
 
LVL 1

Author Comment

by:chillinlong
ID: 12272978
Ah well nobody else has answered.

Thanks again for your response you can have the points for the effort you made cheers again.
0
 
LVL 1

Author Comment

by:chillinlong
ID: 12792582
Graye
I seem to be struglling trying to run this vbs files you mentioned. I appreaciate there is a manual but I still cannot find the programs to make these scripts work.

Where do I start please?

0
 
LVL 41

Expert Comment

by:graye
ID: 12799763
We typically only distribute "source code"... not complete applications.   So the files that are available on our web site require the Visual Studio .Net 2003 package to compile the source code into programs that you can use.

That means you're gonna have to find somebody with Visual Studio .Net 2003 installed to compile it for you.   Sorry about that
0

Featured Post

Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

Question has a verified solution.

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

Entering a date in Microsoft Access can be tricky. A typo can cause month and day to be shuffled, entering the day only causes an error, as does entering, say, day 31 in June. This article shows how an inputmask supported by code can help the user a…
This article will inform Clients about common and important expectations from the freelancers (Experts) who are looking at your Gig.
In this fourth video of the Xpdf series, we discuss and demonstrate the PDFinfo utility, which retrieves the contents of a PDF's Info Dictionary, as well as some other information, including the page count. We show how to isolate the page count in a…

738 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