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
50 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
Comment Utility
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
Comment Utility
well, I will give it a try....thanks
0

Featured Post

Maximize Your Threat Intelligence Reporting

Reporting is one of the most important and least talked about aspects of a world-class threat intelligence program. Here’s how to do it right.

Join & Write a Comment

I've always wanted to allow a user to have a printer no matter where they login. The steps below will show you how to achieve just that. In this Article I'll show how to deploy printers automatically with group policy and then using security fil…
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…
This video demonstrates how to create an example email signature rule for a department in a company using CodeTwo Exchange Rules. The signature will be inserted beneath users' latest emails in conversations and will be displayed in users' Sent Items…
This video explains how to create simple products associated to Magento configurable product and offers fast way of their generation with Store Manager for Magento tool.

771 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

12 Experts available now in Live!

Get 1:1 Help Now