Jump to content

Recommended Posts

Posted

not sure whether to put this in here or scripts but i think its a windows error rather than the script. I'm trying to add a printer to the room, sounds simple enough right.

But i make a new policy group named f9 printer then add the script. If i add the script to the user configuration logon part the policy is filtered out. If i add the script to the computer configuration startup part the policy is in the policy list as loaded but i get no printer on login. Where am i going wrong?! here are the scripts i'm using

 

printui -

 

rundll32 printui.dll,PrintUIEntry /y /q /n\\fs2\f9-hl2040

rundll32 printui.dll,PrintUIEntry /in /q /n\\fs2\f9-3600n

 

VB

 

' Printers.vbs - Windows Logon Script.

Set objNetwork = CreateObject("WScript.Network")

objNetwork.AddWindowsPrinterConnection "\\fs2\f9-hl2040"

objNetwork.AddWindowsPrinterConnection "\\fs2\f9-3600n"

 

I'm obviously not using both scripts at the same time but i've tried both and get the same results. Also if i execute them manually when i log in they both add the printers.

 

thanks

Posted

printui -

 

rundll32 printui.dll,PrintUIEntry /y /q /n\\fs2\f9-hl2040

rundll32 printui.dll,PrintUIEntry /in /q /n\\fs2\f9-3600n

 

I don't have much experience with these but you may need a /ga switch in there to make it a machine added printer. i would also put them the other way round i.e. add printer then set as default

Posted
best way ive found of doing per computer printers is to make a startup script that copies a shortcut to you printer script (obviously located on a shared network location with auth users read/execute) to the pcs all user startup folder that way everyime someone logs into that pc they get that pcs printers
Posted

This is the general format of a VBS script we use to set-up printers through AD:

Set WshNetwork = CreateObject("WScript.Network")
on Error Resume Next

Printer1="\\servername\printername"

'Deletes all network printers
Set clPrinters = WshNetwork.EnumPrinterConnections
On Error Resume Next
For i = 0 to clPrinters.Count - 1 Step 2
WshNetwork.RemovePrinterConnection clPrinters.Item(i+1), true
Next

'Sets up printers
WshNetwork.AddWindowsPrinterConnection Printer1
WshNetwork.SetDefaultPrinter Printer1

 

If you don't want to set one of the network printers as default (perhaps a USB printer is connected), then comment out or delete the last line.

 

The only problem we have is if the printer driver isn't already on the PC, we have to log-in using a domain admin account to allow the driver to install. It's been making us scratch our heads for a while, but not a big problem so we haven't pursued it much.

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