1
vote
Vote UpVote

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 ...
Favorite? Off-Topic? Rodrigo @ 2011-11-05 22:01

Statistics

Visits: 564
Votes: 1
Favorites: 0
Off-Topic: 0

Visits by Source

User Actions

Users who voted for this posting

Horbs
Subscribe:
Contact us to advertise on DelphiFeeds.com

Community Links

Torry Firebird News

Sponsor

 
Please login or register to use this functionality.
(click on this box to dismiss)