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

Ransomware-A Revenue Bonanza for Service Providers

Ransomware – malware that gets on your customers’ computers, encrypts their data, and extorts a hefty ransom for the decryption keys – is a surging new threat.  The purpose of this eBook is to educate the reader about ransomware attacks.

Question has a verified solution.

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

Suggested Solutions

Deploying a Microsoft Access application in a Citrix environment is not difficult but takes a few steps. However, Citrix system people are often of little help, as they typically know next to nothing about Access. The script provided here will take …
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 Micro Tutorial will give you a basic overview how to record your screen with Microsoft Expression Encoder. This program is still free and open for the public to download. This will be demonstrated using Microsoft Expression Encoder 4.
With the power of JIRA, there's an unlimited number of ways you can customize it, use it and benefit from it. With that in mind, there's bound to be things that I wasn't able to cover in this course. With this summary we'll look at some places to go…

863 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

25 Experts available now in Live!

Get 1:1 Help Now