[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

Logon Script to change network printers from one server to another

Posted on 2005-05-16
7
Medium Priority
?
303 Views
Last Modified: 2010-04-12
I’m looking to create a logon script in an environment of Win2k and XP Pro on a Windows 2000 domain for changing the server hosting the network share of a printer.  In a small office of 15 users I have a Windows 2000 server sharing the 3 printers in that site.  The 15 users either have one, both, or all three printers in their local profiles with the default printer being different from person to person too.

I’m replacing the existing Win2k server with a new one and would like to change the printers on each client machine without going from computer to computer.  The shared names of the printers on the new server are the same as the old.  How can I create a script to change the server?  The script could be a vbs, wsh, or a batch file; it doesn’t matter to me.

Example:  
User1 on Computer1 has a connection to \\OldServer\Printer1 and \\OldServer\Printer3 under her profile with Printer3 as the default.  

User2 on Computer2 has a connection to \\OldServer\Printer2 and \\OldServer\Printer3 under his profile with Printer2 as the default.  

The ideal script would simply rename \\OldServer to \\NewServer in both scenarios without changing the default printer and without adding a printer they didn’t connect to before.  
0
Comment
Question by:gndcdosps
6 Comments
 
LVL 5

Expert Comment

by:Edan
ID: 14018035
Just out of interest, if you're replacing the old server and taking it off the network, why can't the new server be named identically?
0
 
LVL 9

Accepted Solution

by:
jonoakley earned 1000 total points
ID: 14022731
Set WshNetwork = WScript.CreateObject("WScript.Network")
PrinterPath = "\\printserv\DefaultPrinter"
WshNetwork.AddWindowsPrinterConnection PrinterPath
0
 
LVL 9

Expert Comment

by:jonoakley
ID: 14022789
These are VBScript. Respond back if you need help on creating logon scripts.

Add the last line to set as the default printer

Set WshNetwork = WScript.CreateObject("WScript.Network")
PrinterPath = \\printserv\DefaultPrinter"
WshNetwork.AddWindowsPrinterConnection PrinterPath
WshNetwork.SetDefaultPrinter PrinterPath


printserv = your server name
DefaultPrinter= your printer share name
0
VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

 
LVL 6

Expert Comment

by:Dark_King
ID: 14121419
seek for "printui.dll,PrintUIEntry" on www.google.com

or type
rundll32 printui.dll,PrintUIEntry /?
0
 
LVL 6

Expert Comment

by:Dark_King
ID: 14121435
at cmd
0
 
LVL 39

Expert Comment

by:hdhondt
ID: 14500886
No comment has been added to this question in more than 21 days, so it is now classified as abandoned..
I will leave a recommendation in the Cleanup topic area that this question is:
Accept jonoakley
Any objections should be posted here in the next 4 days. After that time, the question will be closed.

PLEASE DO NOT ACCEPT THIS COMMENT AS AN ANSWER!

hdhondt
EE Cleanup Volunteer
0

Featured Post

[Webinar] Cloud and Mobile-First Strategy

Maybe you’ve fully adopted the cloud since the beginning. Or maybe you started with on-prem resources but are pursuing a “cloud and mobile first” strategy. Getting to that end state has its challenges. Discover how to build out a 100% cloud and mobile IT strategy in this webinar.

Question has a verified solution.

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

This seems to be a very common error related to the Samsung printer driver. First, this is the error we're talking about: Log: System Type: Error Event: 7000 Agent Time: 3:37:24 am 22-Apr-09 Event Time: 6:07:24 pm 21-Apr-09 UTC Source: Se…
When I recently replaced my image transfer kit on my office HP color laserjet 5550dn printer, I had a slight problem.  The left bracket that holds the transfer kit got stuck in the upright locked position instead of being at a 45 degree angle facing…
Please read the paragraph below before following the instructions in the video — there are important caveats in the paragraph that I did not mention in the video. If your PaperPort 12 or PaperPort 14 is failing to start, or crashing, or hanging, …
In a question here at Experts Exchange (https://www.experts-exchange.com/questions/29062564/Adobe-acrobat-reader-DC.html), a member asked how to create a signature in Adobe Acrobat Reader DC (the free Reader product, not the paid, full Acrobat produ…
Suggested Courses
Course of the Month19 days, 20 hours left to enroll

873 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