I have found scripts to install network printers, but
none to install local printers.
I would also like to have this printer setup to print to file.
Thanks for all comments.
--
Tim
> OS: Windows XP
>
> I have found scripts to install network printers, but
> none to install local printers.
>
> I would also like to have this printer setup to print to file.
>
One of these examples from the Script Center should help:
http://www.microsoft.com/technet/scriptcenter/scripts/printing/ports/prpovb04.mspx
http://www.microsoft.com/technet/scriptcenter/scripts/printing/ports/prpovb03.mspx
--
Richard Mueller
MVP Directory Services
Hilltop Lab - http://www.rlmueller.net
--
I can install ""HP LaserJet 5Si" manually without any problem.
I want to perform the install via automation.
Tim
Option Explicit
Call Main
Sub Main
Dim strComputer, objWMIService,objDriver, errResult
strComputer = "."
Set objWMIService = GetObject("winmgmts:" _
& "{impersonationLevel=impersonate}!\\" & strComputer & "\root\cimv2")
Set objDriver = objWMIService.Get("Win32_PrinterDriver")
objWMIService.Security_.Privileges.AddAsString "SeLoadDriverPrivilege", True
'objDriver.Name = "Apple LaserWriter 8500"
objDriver.Name = "HP LaserJet 5Si"
objDriver.SupportedPlatform = "Windows NT x86"
objDriver.Version = "3"
errResult = objDriver.AddPrinterDriver(objDriver)
MsgBox errResult
End Sub