Page 1 of 1 1
Topic Options
#207810 - 2013-09-26 08:20 AM Determine the default printer
Janik Offline
Just in Town

Registered: 2013-09-03
Posts: 3
Loc: Germany
Hello!

I'd like to get the clients default printer and then write it to a file. Currently I have not been able to find anything else than just "SetDefaultPrinter".

Is there any way to realize this?

Top
#207811 - 2013-09-26 12:44 PM Re: Determine the default printer [Re: Janik]
Glenn Barnas Administrator Offline
KiX Supporter
*****

Registered: 2003-01-28
Posts: 4403
Loc: New Jersey
Read the Device value from HKEY_CURRENT_USER\Software\Microsoft\Windows NT\CurrentVersion\Windows - this is the default printer.
 Code:
$DPrinter = ReadValue('HKEY_CURRENT_USER\Software\Microsoft\Windows NT\CurrentVersion\Windows', 'Device')
Glenn
_________________________
Actually I am a Rocket Scientist! \:D

Top
#207813 - 2013-09-26 04:51 PM Re: Determine the default printer [Re: Glenn Barnas]
Allen Administrator Offline
KiX Supporter
*****

Registered: 2003-04-19
Posts: 4574
Loc: USA
And in UDF form there are:

GetDefaultPrinter() -
http://www.kixtart.org/forums/ubbthreads.php?ubb=showflat&Number=118766

PrinterConnection() -
http://www.kixtart.org/forums/ubbthreads.php?ubb=showflat&Number=203840#Post203840

How to use UDFs -
http://www.kixtart.org/forums/ubbthreads.php?ubb=showflat&Number=81943#Post81943

The rest of the UDFs are here -
http://www.kixtart.org/forums/ubbthreads.php?ubb=postlist&Board=7&page=1
_________________________
(... better days ahead)

Top
#207825 - 2013-09-27 11:29 PM Re: Determine the default printer [Re: Allen]
Lonkero Administrator Offline
KiX Master Guru
*****

Registered: 2001-06-05
Posts: 22346
Loc: OK
primapstate() missing from your list....
_________________________
!

download KiXnet

Top
Page 1 of 1 1


Moderator:  Jochen, Allen, Radimus, Glenn Barnas, ShaneEP, Ruud van Velsen, Arend_, Mart 
Hop to:
Shout Box

Who's Online
1 registered (Henriques) and 2516 anonymous users online.
Newest Members
fgarcia, Viginette, ManuvdWielNL, Sir_Barrington, batdk82
17889 Registered Users

Generated in 0.056 seconds in which 0.026 seconds were spent on a total of 13 queries. Zlib compression enabled.

Search the board with:
superb Board Search
or try with google:
Google
Web kixtart.org