uniquely identify a printer

EDN Admin

Well-known member
Joined
Aug 7, 2010
Messages
12,794
Location
In the Machine
<P> </P>
<P>Is there a way to uniquely identify a printer other than the printer name? I retrieve data for a printer by performing a query on the <FONT size=2>WIN32_Printer <FONT size=3> storage class (C# code) </FONT></FONT></P><FONT size=2><FONT size=2>
<P>ObjectQuery oq = </FONT><FONT color=#0000ff size=2>new</FONT><FONT size=2> ObjectQuery("SELECT * FROM WIN32_Printer");</P></FONT>
<P><FONT size=2><FONT size=3>The only property that uniquely identifies a printer seems to be Name. </FONT></FONT></P>
<P><FONT size=2><FONT size=3>I want to store settings for a printer in file. But if the printer is renamed, I no longer can to identify the renamed printer.</FONT></FONT></P>
<P><FONT size=3>Is there other way to identify the printer? (Like a guid for example)?</FONT></P>
<P><FONT size=2><FONT size=3></FONT>...Should I post this on another forum ? I posted it here because it seems that answering this question requires intimate windows knowledge.</P></FONT></FONT>

View the full article
 
Back
Top