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
60 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
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

NAS Cloud Backup Strategies

This article explains backup scenarios when using network storage. We review the so-called “3-2-1 strategy” and summarize the methods you can use to send NAS data to the cloud

Question has a verified solution.

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

A quick step-by-step overview of installing and configuring Carbonite Server Backup.
Restoring deleted objects in Active Directory has been a standard feature in Active Directory for many years, yet some admins may not know what is available.
This is used to tweak the memory usage for your computer, it is used for servers more so than workstations but just be careful editing registry settings as it may cause irreversible results. I hold no responsibility for anything you do to the regist…
Microsoft Active Directory, the widely used IT infrastructure, is known for its high risk of credential theft. The best way to test your Active Directory’s vulnerabilities to pass-the-ticket, pass-the-hash, privilege escalation, and malware attacks …

813 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

13 Experts available now in Live!

Get 1:1 Help Now