Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 214
  • Last Modified:

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

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
chillinlong
Asked:
chillinlong
  • 4
  • 3
1 Solution
 
grayeCommented:
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
 
grayeCommented:
...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
 
chillinlongAuthor Commented:
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
Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

 
grayeCommented:
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
 
chillinlongAuthor Commented:
Ah well nobody else has answered.

Thanks again for your response you can have the points for the effort you made cheers again.
0
 
chillinlongAuthor Commented:
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
 
grayeCommented:
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

Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

  • 4
  • 3
Tackle projects and never again get stuck behind a technical roadblock.
Join Now