Jump to content

Problem assigning printers at logon - SOLVED


Recommended Posts

Guest richard
Posted

We have a simple script which we are trying to use to assign printers to pc's when the user logs on. When the script is run manually it works fine but if we and run it at logon via a group policy it doesn'y work.

 

Anyone got any ideas?

Posted
Are you running it (or a similar script) at machine startup. If not, the PC's wont have the printer drivers loaded on them. Thus the mapping will fail when the users login.
Guest richard
Posted

Here is the script that we are using:

 

Option Explicit
Dim objNetwork, strLocal, strUNCPrinter1, strUNCPrinter2
strUNCPrinter1 = "\\Server1d\Brother HL-5270DN Library 1"
strUNCPrinter2 = "\\Server1d\Brother HL-5270DN Library 2"
Set objNetwork = CreateObject("WScript.Network") 
objNetwork.AddWindowsPrinterConnection strUNCPrinter1
objNetwork.AddWindowsPrinterConnection strUNCPrinter2
objNetwork.SetDefaultPrinter "\\Server1d\Brother HL-5270DN Library 1"


WScript.Quit

Posted
It looks ok but have you checked the issues as Geoff has suggested eg does it run as a logon script after you have run it manually? This would suggest it is a permission issue and you will need to add that script as a startup script as well as suggested. Otherwise there should be some error in the event log.
Guest richard
Posted
The drivers are installed on the server and pulled down when the printer is installed. I'll try it as a startup script instead of running it at the the logon.
Guest richard
Posted
Normal users do not have sufficient permissions to install/update printer drivers via login script.

 

Even tried it when I login with my account which has administrator privledges and it still doesn't work.

Guest richard
Posted
Are you sure the script is actually running? Add something like

wscript.echo "Script has run"

to make sure.

 

The script is running but it still installing the printers :Cry:

Guest richard
Posted

Result. After doing a bit of trial and error I have got it working by running it from the "Run these programs at user logon" option in the group policy.

 

For those how don't know where it is here's the path.

 

Computer Configuration - Administrative Templates - System - Logon

 

It now works like a charm. Thanks for all your help.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now



×
×
  • Create New...