🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.cppbuilder.nativeapi
Article #14295

Re: How to get windows default printer?

#14295
From: Stephan
Date: Wed, 20 Aug 2003 19:05
69 lines
3224 bytes
Hi Remy,
wow, did I goof up that key..
That's what I get for being distracted.
Thanks for the correction.

I don't know for sure, but I am guessing that the "default"
printer value is missing from key:

HKEY_LOCAL_MACHINE\System\CurrentControlSet\
  Control\Print\Printers

to allow different default printers for either
1) different users or 2) hardware configurations?
I assume that whatever creates subkeys of

HKEY_LOCAL_MACHINE\Config\

is where the variation comes in.
if that is so, then it becomes a matter to determine which subkey of
HKEY_LOCAL_MACHINE\Config\
is active then read the default printer from there.

looked up some stuff at uSoft...

http://support.microsoft.com/default.aspx?scid=kb;en-us;156212

which states that one should look up:
HKEY_ CURRENT_USER\Software\Microsoft\Windows NT\CurrentVersion\Windows

the registry entry   Device:REG_SZ:<printer description>
example printer description:

\\SERVER\HPLASER,winspool,Ne00: or DESKJET,winspool,LPT1:

I have also found in the Microsoft Knowledge Base Article - 246772
"HOWTO: Retrieve and Set the Default Printer in Windows"

Have FUN
Stephan

"Remy Lebeau (TeamB)" <gambit47@yahoo.com> wrote in message
news:3f43bea6$1@newsgroups.borland.com...

"Stephan" <slaska@devarinc.com> wrote in message
news:3f43b12c@newsgroups.borland.com...

> In WIN98SE I find the key:
> HKEY_LOCAL_MACHINE|Config|System|Print|Printers

The correct key is as follows:

HKEY_LOCAL_MACHINE\Config\0001\System\CurrentControlSet\Control\Print\Printe
rs

You should use this one instead, though:

HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\Print\Printers

Which is the same key under Win2K as well.  However, there is no "Default"
value under that key for either OS :-(


Gambit


---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.510 / Virus Database: 307 - Release Date: 8/14/03
Technical Details
Message-ID: <3f43c699$1@newsgroups.borland.com>
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-06!sn-xit-09!supernews.com!newsfeed.news2me.com!newsfeed.freenet.de!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail
References: <3f415360$1@newsgroups.borland.com> <3f41597f$2@newsgroups.borland.com> <3f427f92$1@newsgroups.borland.com> <3f42a272$1@newsgroups.borland.com> <3f42b824@newsgroups.borland.com> <3f42de67$1@newsgroups.borland.com> <3f43a7cf$1@newsgroups.borland.com> <3f43b12c@newsgroups.borland.com> <3f43bea6$1@newsgroups.borland.com>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 10cc67,16abfae200d036ee
X-Google-Attributes: gid10cc67,public
X-Google-ArrivalTime: 2003-08-20 12:11:28 PST
From: "Stephan" <slaska@devarinc.com>
Newsgroups: borland.public.cppbuilder.nativeapi
References: <3f415360$1@newsgroups.borland.com> <3f41597f$2@newsgroups.borland.com> <3f427f92$1@newsgroups.borland.com> <3f42a272$1@newsgroups.borland.com> <3f42b824@newsgroups.borland.com> <3f42de67$1@newsgroups.borland.com> <3f43a7cf$1@newsgroups.borland.com> <3f43b12c@newsgroups.borland.com> <3f43bea6$1@newsgroups.borland.com>
Subject: Re: How to get windows default printer?
Date: Wed, 20 Aug 2003 15:05:59 -0400
Lines: 72
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2800.1158
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1165
NNTP-Posting-Host: 64.252.14.74
Message-ID: <3f43c699$1@newsgroups.borland.com>
X-Trace: newsgroups.borland.com 1061406361 64.252.14.74 (20 Aug 2003 12:06:01 -0700)
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-06!sn-xit-09!supernews.com!newsfeed.news2me.com!newsfeed.freenet.de!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail