[THIN] Need scripting help

  • From: "Stansel, Paul (ISD, IT)" <Paul.Stansel@xxxxxxxxxxxxxxx>
  • To: "'thin@xxxxxxxxxxxxx'" <thin@xxxxxxxxxxxxx>
  • Date: Mon, 8 Mar 2004 11:48:35 -0500

Ok, we have a Kix file that queries an ini file and maps user printers.
We're trying to clean up some old mappings, so I set a similar section in
the file using DelPrinterConnection.  Works like a champ, reads the same
lines and deletes the print mappings just fine.  The problem is that I want
logic to check if the printer actually exists before I go through the
process of deleting it.  If it doesn't exist, it pauses for a while before
continuing to process the next deletion.  The printer ini file looks like
this:
 

 

[CBI]

NumberPrinter=1

printer1=\\AD2SIMPRT001\HLIEBHOHPL02

printer2=

printer3=

printer4=

 

Is there a way to query the registry for the existence of that printer
before trying to delete it?  I was trying to use EnumValue and compare it to
a variable that is the printer name, but it was failing.  Just looking for
ideas.

 

Thanks,

Paul



This communication, including attachments, is for the exclusive use of 
addressee and may contain proprietary, confidential or privileged 
information. If you are not the intended recipient, any use, copying, 
disclosure, dissemination or distribution is strictly prohibited. If 
you are not the intended recipient, please notify the sender 
immediately by return email and delete this communication and destroy all 
copies.



********************************************************
This weeks sponsor triCerat Inc.
triCerat makes your job easier by offering essential
applications to eliminate your printing, policy and profile,
and your application management problems.
http://www.triCerat.com 
**********************************************************
Useful Thin Client Computing Links are available at:
http://thin.net/links.cfm
***********************************************************
For Archives, to Unsubscribe, Subscribe or 
set Digest or Vacation mode use the below link:
http://thin.net/citrixlist.cfm

Other related posts: