• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1346
  • Last Modified:

Install VBS printer map w/ Admin rights

Hello,
We want to map printer using the below VB script but need to install as admin so not to prompt our users for admin rights when downloading drivers.

And of course, we don't want this visible to users (admin password).

Clients are W7/server 2003 sp2

Please advise....
We are using the below code to map network printers...want to attach it to log on script.
Problem is machines ask for admin rights.  how can we add that option to script and protect it from users seeing admin password?

Option Explicit
Dim netPrinter, UNCpath
UNCpath = "\\share\printer"
Set netPrinter = CreateObject("WScript.Network" )
netPrinter.AddWindowsPrinterConnection UNCpath
' Here is where we set the default printer
netPrinter.SetDefaultPrinter UNCpath

UNCpath = "\\share\printer"
netPrinter.AddWindowsPrinterConnection UNCpath
'Adds second printer 

Open in new window

0
unTech
Asked:
unTech
  • 3
  • 2
1 Solution
 
Don S.Commented:
There is a GPO setting that allows non-admin users to install printer drivers without being prompted to elevate rights.  The setting is in the User adminitrative templates, control panel/printers Point and Print Restrictions - set it to disabled.
0
 
unTechAuthor Commented:
No.  I still get prompted for admin password.  
I updated GP on machine and printed out policy report to file to verify and Point and Print Restrictions - set it to disabled.

I think the computer policy is still in affect.  I do not see Point and Print Restrictions (Computer Configuration -> Policies -> Administrative Templates -> Printers : Point and Print Restrictions) in 2003 server per this document:  http://support.microsoft.com/kb/2307161

However, when using GPUPDATE and looking at Computer Config while pointing to Domain Controller it says that the Policy definitions (ADMX files) retrieved from local machine.

Why cannot I edit them on domain?
0
 
unTechAuthor Commented:
0
 
Don S.Commented:
You need to do all of your windows 7 policy editing from the RSAT tools on a Windows computer.  Group policy editing on a 2003 server does not know about Windows 7 and won't have all of the items to edit - Point and Print at the computer level being one of them.
0
 
unTechAuthor Commented:
This is what worked best
0

Featured Post

[Webinar On Demand] Database Backup and Recovery

Does your company store data on premises, off site, in the cloud, or a combination of these? If you answered “yes”, you need a data backup recovery plan that fits each and every platform. Watch now as as Percona teaches us how to build agile data backup recovery plan.

  • 3
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now