t***@gmail.com
2005-08-03 21:51:44 UTC
strComputer = "."
Set objWMIService = GetObject("winmgmts:" _
& "{impersonationLevel=impersonate}!\\" & strComputer &
"\root\cimv2")
objWMIService.Security_.Privileges.AddAsString "SeLoadDriverPrivilege",
True
Set objDriver = objWMIService.Get("Win32_PrinterDriver")
objDriver.Name = "HP Color LaserJet 4600 PCL 6"
objDriver.SupportedPlatform = "Windows NT x86"
objDriver.Version = "3"
objDriverPath = "\\tmco\replication\TMCO\IT\PRINTERS\clj4600\"
objInfname = "\\tmco\replication\TMCO\IT\PRINTERS\clj4600\hp4600p6.inf"
intResult = objDriver.AddPrinterDriver(objDriver)
wScript.Echo intResult
I get a pop up of 87. Anyone know what's wrong? I get the same error
if I have the driver path and inf file on the c: drive and make the
necessary changes. Thanks.
Set objWMIService = GetObject("winmgmts:" _
& "{impersonationLevel=impersonate}!\\" & strComputer &
"\root\cimv2")
objWMIService.Security_.Privileges.AddAsString "SeLoadDriverPrivilege",
True
Set objDriver = objWMIService.Get("Win32_PrinterDriver")
objDriver.Name = "HP Color LaserJet 4600 PCL 6"
objDriver.SupportedPlatform = "Windows NT x86"
objDriver.Version = "3"
objDriverPath = "\\tmco\replication\TMCO\IT\PRINTERS\clj4600\"
objInfname = "\\tmco\replication\TMCO\IT\PRINTERS\clj4600\hp4600p6.inf"
intResult = objDriver.AddPrinterDriver(objDriver)
wScript.Echo intResult
I get a pop up of 87. Anyone know what's wrong? I get the same error
if I have the driver path and inf file on the c: drive and make the
necessary changes. Thanks.