Solved

I need login script I can run on 2012r2 domain that will map drives to an old 2003 print server

Posted on 2016-08-02
2
69 Views
Last Modified: 2016-08-08
I know someone already tried to help me but I think I was too vague when I explained it the first time. We are running a 2012r2 domain. We have one site that has an old printer server running Windows 2003. I want to write a login script or call a VBS from the original .BAT what will map the local users in that office to printers on their local server. Someone gave me some commands similar to what I listed below, but I actually need to run this from a login script that I will assign to a few users in active directory. The script needs to map or call a vbs that will map local printers. The info below may be useful, but I need assistance in calling it from a .bat, where to store the scripts in active directory and just general instructions on how to make this happen. I am not able to add Print Management to Windows 2003 so I need to learn how to do it the old way..thanks

Can I use this script? I assume this needs to be named VBS, but where do I store it? With the rest of the login scripts in AD?
On Error Resume Next
Dim netPrinter, newprt1
Set netPrinter = CreateObject("New-Object -Com WScript.Network")
newprt1 = "\\PrtSrv\PRT IRC350"
newprt2 = "\\PrtSrv\PRT IR400"
netPrinter.AddWindowsPrinterConnection newprt1, True
netPrinter.AddWindowsPrinterConnection newprt2, True
netPrinter.SetDefaultPrinter "\\PrtSrv\PRT IR400"
0
Comment
Question by:Thor2923
[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
2 Comments
 
LVL 1

Accepted Solution

by:
Glenn Madine earned 500 total points
ID: 41739709
You may not need to use a VBS script as you can insert the following command into your .Bat file

RunDll32 printui.dll PrintUIEntry /y /in /n \\YourPrintServerName\YourSharedPrinterName
0
 
LVL 1

Author Comment

by:Thor2923
ID: 41739748
well, I will give it a try....thanks
0

Featured Post

Online Training Solution

Drastically shorten your training time with WalkMe's advanced online training solution that Guides your trainees to action. Forget about retraining and skyrocket knowledge retention rates.

Question has a verified solution.

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

When it comes to writing scripts for a Client/Server computing environment it is essential to consider some way of enabling the authentication functionality within a script. This sort of consideration mainly comes into the picture when we are dealin…
A quick step-by-step overview of installing and configuring Carbonite Server Backup.
In an interesting question (https://www.experts-exchange.com/questions/29008360/) here at Experts Exchange, a member asked how to split a single image into multiple images. The primary usage for this is to place many photographs on a flatbed scanner…
This video shows how to use Hyena, from SystemTools Software, to update 100 user accounts from an external text file. View in 1080p for best video quality.

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