Solved

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

Posted on 2004-10-07
7
207 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
  • 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
Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

 
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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Specific format 21 185
groupSum6 challenge 6 77
numbers ascending pyramid 100 141
control image tags in a string ? 12 111
Here we come across an interesting topic of coding guidelines while designing automation test scripts. The scope of this article will not be limited to QTP but to an overall extent of using VB Scripting for automation projects. Introduction Now…
In this post we will learn how to connect and configure Android Device (Smartphone etc.) with Android Studio. After that we will run a simple Hello World Program.
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…
With the power of JIRA, there's an unlimited number of ways you can customize it, use it and benefit from it. With that in mind, there's bound to be things that I wasn't able to cover in this course. With this summary we'll look at some places to go…

863 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

22 Experts available now in Live!

Get 1:1 Help Now