[THIN] Re: Attention scripting gurus

  • From: "Andrew Rogers" <Andrew.Rogers@xxxxxxxxxxxxxxxxxx>
  • To: <thin@xxxxxxxxxxxxx>
  • Date: Tue, 02 Mar 2004 09:45:46 +0000

You dont mention how the printers actually connected to the client.. \\clie=
nt\lpt1: is literally the parallel port, (unless something like "net use lp=
t1: \\server\printer1" has been run of course..!) so might want to expand o=
n that :)

As for the printer ports, try net use'ing "\\client\compname#\printername" =
(ie, \\client\laptop#\canon from your examples) - but again im not sure if =
you've tried that (you've missed off the \\ at the start in your message?)

Andrew
--o--

>>> Adam.Baum@xxxxxxxxxxxxxx 01/03/04 23:09:39 >>>
Mighty scripting gurus,

I am trying to map a printer via a remote session.  Just for grins, I
turned off all the drive/printer mappings in User Mgr for the account I am
using.  To map a C: drive, "net use c: \\client\c$" works.  I tried doing
the same for a printer using "net use lpt1:  \\client\lpt1:".  I get a
succesful msg, but nothing seems to print so I dide a net use lpt1: /d to
delete the mapping.

Just for grins, I opened up notepad and did a File,Print, Find Printer.  I
was able to navigate to the printer on my laptop and map it as my default.
I found it under Client Network, Client.

Question:  how can I script it (WMI or other)?  I tried using without
success:
Set WshNetwork =3D CreateObject("WScript.Network")
WshNetwork.AddWindowsPrinterConnection "\\client\canon"
WshNetwork.SetDefaultPrinter "\\client\canon"

I've replaced \\client\canon with client\laptop#\canon, \laptop\canon,
\latop#\canon, and a few others.  None seem to work.  I figure if I can
enumerate/browse it in a session, I should be able to script it.  Problem
is that I am not a good scripter.  Help please.

adam


********************************************************
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: