![]() |
![]() | ![]() | ![]() | ![]() | ![]() | ![]() | ![]() |
|
Welcome to Vista Forums we are your forum to discuss Windows Vista x64 and x86 systems. Whether you need help or just want to post an idea you have on Vista, this is the forum for you.
br> br> |
| |||||||
![]() |
| | Thread Tools | Display Modes |
| | #1 (permalink) |
| Guest | Installing a new Printer Hello, i wrote following Script to install a Printer-Driver. There is no Error, but the Driver do not apear in the Dialog Printers & Fax from Windows. What ist wrong? How to install a new Port, I do know (thanks to /\/\o\/\/). The used port exists. Here ist my Code: $strComputer = "." $strDruckername="Brother HJ-100" $strPortname="IP_169.254.110.15" #Skriptbloecke und Funktionen #Skriptinhalt $objTreiber = [WmiClass]'Win32_PrinterDriver' #erzeugen der neuen Instanz $objNeuerTreiber=$objTreiber.CreateInstance() $objNeuerTreiber.Name = $strDruckername $objNeuerTreiber.SupportedPlatform = "Windows NT x86" $objNeuerTreiber.Caption=($strDruckername + "-2") $objNeuerTreiber.Version = 3 $erg = $objTreiber.AddPrinterDriver($objNeuerTreiber) $erg=$objTreiber.Put() #Treiber ist installiert, nun Drucker hinzufuegen #Drucker-Klasse zurueckgeben $objDrucker = [WmiClass]'Win32_Printer' #Objekt erzeugen $objNeuerDrucker=$objDrucker.CreateInstance() #Eigenschaften festlegen $objNeuerDrucker.Name=($strDruckername) $objNeuerDrucker.Description="automatisch erzeugter Drucker" $objNeuerDrucker.Portname=$strPortname $objNeuerDrucker.DriverName=$strDruckername $erg=$objDrucker.AddPrinterConnection(($strDruckername)) $objDrucker.Put() |
![]() |
| Thread Tools | |
| Display Modes | |
| |
Similar Threads | ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Installing Printer | GFL4 | Vista hardware & devices | 2 | 03-12-2008 11:07 PM |
| Printer keeps re-installing | gmaof3 | Vista hardware & devices | 2 | 01-08-2008 11:06 AM |
| installing a printer | Aljr595 | Vista print fax & scan | 1 | 11-03-2007 08:49 PM |
| Installing the printer | AnnB. | Vista print fax & scan | 2 | 10-11-2007 12:44 PM |
| Creating new Printer-Port and installing new Printer | Jens Schulze | PowerShell | 3 | 10-11-2006 02:18 PM |