Jump to content

Default printer woes


Recommended Posts

Hi trying to set the default printer in multiple labs in an Active directory environment .

If I login with a user code called Teststudent it changes the default printer

If I login with a user code called Jsmith the following code generates an error

Any help would be appreciated.

Default printer vbs script.

WScript.Sleep(1000 * 20)

Set WshNetwork = CreateObject("WScript.Network")
PrinterPath = "\\server01\2F18P"
PrinterDriver = "HP LaserJet 4200/4300 PCL6"
WshNetwork.AddWindowsPrinterConnection PrinterPath, PrinterDriver
WshNetwork.SetDefaultPrinter "\\server01\2F18P"

When Logged in as Jsmith the following error occurs. Is it a user rights issue or a vb script problem?

vberror.jpg

Edited by clivebuckwheat
Link to comment
Share on other sites


Do both users have the same rights on the machine? Since the script is trying to install the driver along with the printer admin rights are required to install the driver.

If you are doing this via group policy you can add the printer under the computer configuration and then set the default printer under the user configuration.

Link to comment
Share on other sites

We have specific printers, per lab.

Our users move around the campus,

For example:

if a user goes to ROOM 2f16, we want them to get printer 2F16 and a common color printer which services the whole campus which is located in a common area,but the default printer should be 2F16

We have over 300 printers on campus. I know we can assign printers per machine level. The default printer has to be assigned on a per user level.

Also I am aware that group policy can set the default printer on in user configuration. Question if we do not know what labs are users will be using on any given day, how are we supposed to assign the default printer on a per user level?

That is why I put the vbs script in the startup of all users and manually set the default printer according to the lab.

Link to comment
Share on other sites

Depends upon how you have AD organized.

I assume you have each lab in its own OU. If you apply the GPO to the OU with the machines for a lab and have the GPO User configuration for the default printer set and assigned to that OU it will only apply when those user log in to a machine in that OU. It won't apply to other machines they log into .

Link to comment
Share on other sites

Depends upon how you have AD organized.

I assume you have each lab in its own OU. If you apply the GPO to the OU with the machines for a lab and have the GPO User configuration for the default printer set and assigned to that OU it will only apply when those user log in to a machine in that OU. It won't apply to other machines they log into .

Yes each lab is in it's on OU, and the lab machines reside there,

We are installing printers per machine with a GPO, which indeed installs the correct printers, but we have found it doesn't set the default printer. I am aware that the default printer is a per user setting. If I understand your post correctly you are saying the following

1. We can install the printers with a per machine?, then under user configuration set the appropriate default printer?, all in the same GPO?

I think when we tried to set the default printer under user configuration we found we could not assign it to OU containing the lab machine, but we could only assign it on a per user basis.

Excuse my ignorance we our currently migrating from Novell to AD, so I am learning on the fly.

Link to comment
Share on other sites

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
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...