strComputer = "." Set objWMIService = GetObject("winmgmts:" _ & "{impersonationLevel=impersonate}!\\" & strComputer & "\root\cimv2") objWMIService.Security_.Privileges.AddAsString "SeLoadDriverPrivilege", True Set colInstalledPrinters = objWMIService.ExecQuery _ ("Select * from Win32_Printer") For Each objPrinter in colInstalledPrinters if (objPrinter.name="Oki ML 590") then objPrinter.driverName = "HPLaserJet4" objPrinter.Put_ msgbox(objPrinter.Name) end if Wscript.Echo objPrinter.driverName next
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)