![]() |
![]() | ![]() | ![]() | ![]() | ![]() | ![]() | ![]() |
| Welcome to Windows Vista Forums. Our forum is dedicated to helping you find solutions with any problems, errors or issues you are experiencing with Windows Vista. The Vista forum also covers news and updates and has an extensive Windows Vista tutorial section that covers a wide range of tips and tricks. |
| |||||||
![]() |
| |
| | #1 (permalink) |
| | check printer driver if exists continue if not install Hi All, With the help of many of you out there I have managed to create a script that will; 1:create a TCP\IP port 2:Add the driver (via an inf file) 3: add the printer to the new port 4: set this as default happy days and a big thanks to all of your guidance. I do however have an additional request of you all. With this installation if the driver exists on the machine I get a windows prompt to do with conflicts. sorry I dont have the exact error. my question so to speak is .. is there a way to determine IF the driver is installed, if it is, use it IF NOT Install this driver and use it? I currently am just copying the driver files to the local machine and installing it regardless. obvioulsy the less the script has to do the better. I am presuming that I can just butcher this section of script; 'adding the driver 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 LaserJet M3035 MFP PCL 5" objDriver.SupportedPlatform = "Windows NT x86" objDriver.Version = "3" objDriver.DriverPath = "C:\temp1\hp3035\hpz5r5io.dll" objDriver.Infname = "C:\temp1\hp3035\hpc3035b.inf" intResult = objDriver.AddPrinterDriver(objDriver) toinclude the if \ then statement to gimme what I need?? Anyone got any Ideas. Cheers Balgrath |
My System Specs![]() |
![]() |
| Thread Tools | |
| |
Similar Threads | ||||
| Thread | Forum | |||
| Old Hp printer deskjet 722C pls help me install a printer driver | .NET General | |||
| How to check if a directory exists | PowerShell | |||
| Can't install HP printer driver | Vista print fax & scan | |||
| Check Designer can not install Capture Printer Driver | Vista installation & setup | |||
| Upgrade Check incorrectly reports McAfee exists and cancels upgrad | Vista installation & setup | |||