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
rundll32 printui.dll,PrintUIEntry /y /q /n\\fs2\f9-hl2040
rundll32 printui.dll,PrintUIEntry /in /q /n\\fs2\f9-3600n
' Printers.vbs - Windows Logon Script.
Set objNetwork = CreateObject("WScript.Network")
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.
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
This is the general format of a VBS script we use to set-up printers through AD:
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.Code: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
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.
There are currently 1 users browsing this thread. (0 members and 1 guests)