Jump to content

installing printer drivers


AO3

Recommended Posts

I would like to install 4 different HP printer drivers to win XP. This way XP will not ask for the drivers, and will auto install the printer for the users. For example a user can plug in usb or Lpt1 for a hp 2420 and XP will have the drivers and will install the printer. The problem I have had. I installed the HP 2420 printer with USB and LPT1 to the laptop. Then when I connect the HP 2420 USB or LPT1 it install it only as a USB connection.

Link to comment
Share on other sites


From my experience, for some printers, if you use a different cable, you have to reset the printer for it to work 'through the other connection", but I don't know if this is your problem. It is also possible that the driver is present on the machine but the user doesn't have the rights to install a local printer.

Link to comment
Share on other sites

You picked the one printer at least in your example that will cause you the most headaches. But enough of a minor rant on HP drivers.

Scripted answer:

strComputer = "."
Set objWMIService = GetObject("winmgmts:{impersonationLevel=impersonate}!\\" & strComputer & "\root\cimv2")
objWMIService.Security_.Privileges.AddAsString "SeLoadDriverPrivilege", True
Set objDriver = objWMIService.Get("Win32_PrinterDriver")

'Laserjet 4200
'Installs Printer Driver

'Replace 'HP LaserJet 4200 PS' with the driver name from the INF
objDriver.Name = "HP LaserJet 4200 PS"
objDriver.SupportedPlatform = "Windows NT x86"
objDriver.Version = "3"

'Replace with path to driver
objDriver.FilePath = "c:\\DRIVERS\\lj4200ps\\"

'Replace with path and name of INF, though some drivers only need the INF name, don't ask me why.
objDriver.Infname = "c:\\DRIVERS\\lj4200ps\\hpc4200d.inf"
intResult = objDriver.AddPrinterDriver(objDriver)

Manual method:

Open Printers and Faxes control panel

Click File

select Server Properties

select Drivers Tab

Click Add

Follow prompts in 'Add Printer Driver Wizard'

Close Print Server Properties window.

That should be all you need to do.

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