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

Easy, flexible multimedia distribution & control

Coming soon!  Ideal for large-scale A/V applications, ATEN's VM3200 Modular Matrix Switch is an all-in-one solution that simplifies video wall integration. Easily customize display layouts to see what you want, how you want it in 4k.

Question has a verified solution.

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

This article is the result of a quest to better understand Task Scheduler 2.0 and all the newer objects available in vbscript in this version over  the limited options we had scripting in Task Scheduler 1.0.  As I started my journey of knowledge I f…
Not long ago I saw a question in the VB Script forum that I thought would not take much time. You can read that question (Question ID  (http://www.experts-exchange.com/Programming/Languages/Visual_Basic/VB_Script/Q_28455246.html)28455246) Here (http…
Nobody understands Phishing better than an anti-spam company. That’s why we are providing Phishing Awareness Training to our customers. According to a report by Verizon, only 3% of targeted users report malicious emails to management. With compan…
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…

808 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