1
vote
WMI Tasks using Delphi – Printers and Printing
The Road to Delphi
– How do I add a new printer connection to a remote computer? Use the Win32_Printer class and the AddPrinterConnection method. var FSWbemLocator : OLEVariant; FWMIService : OLEVariant; FWbemObject : OLEVariant; begin; FSWbemLocator := CreateOleObject('WbemScripting.SWbemLocator'); FWMIService := FSWbemLocator.ConnectServer('localhost', 'root\CIMV2', '', ''); FWbemObject := FWMIService.Get('Win32_Printer'); FWbemObject.AddPrinterConnection('\\PrintServer1\ArtDepartmentPrinter'); end; How do I set the default printer? Use the Win32_Printer class and the SetDefaultPrinter ...
Statistics
|
Visits by Source |
User Actions |




