#165607 - 2006-08-09 12:40 AM
Install Printers by Computer Names
|
hieucao
Fresh Scripter
Registered: 2006-08-09
Posts: 18
|
Does any know if there's a way to have KIX install specific printers to a group of computer name? For example: if the computer name is FA*, then install printerA, if computer name is FB*, then install printerB...Also, can wildcard be used in this case?
TIA. Hieu
|
|
Top
|
|
|
|
#165609 - 2006-08-09 12:54 AM
Re: Install Printers by Computer Names
|
Witto
MM club member
   
Registered: 2004-09-29
Posts: 1828
Loc: Belgium
|
Something like: Code:
Select Case Left(@WKSTA,2) = "FA" $ = AddPrinterConnection("\\Server\PrinterA") Case Left(@WKSTA,2) = "FB" $ = AddPrinterConnection("\\Server\PrinterB") EndSelect
|
|
Top
|
|
|
|
#165611 - 2006-08-09 12:56 AM
Re: Install Printers by Computer Names
|
hieucao
Fresh Scripter
Registered: 2006-08-09
Posts: 18
|
Thanks Witto, Gargoyle! I'll give it a try and will post the result.
Hieu
|
|
Top
|
|
|
|
#165612 - 2006-08-09 01:25 AM
Re: Install Printers by Computer Names
|
Benny69
Moderator
   
Registered: 2003-10-29
Posts: 1036
Loc: Lincoln, Ne
|
witto, don't feel bad, gargoyle just did that to me too over at kforg, he has been realy sneaky the past couple days  or maybe i have been realy slow
Edited by benny69 (2006-08-09 01:26 AM)
|
|
Top
|
|
|
|
#165613 - 2006-08-09 01:58 AM
Re: Install Printers by Computer Names
|
hieucao
Fresh Scripter
Registered: 2006-08-09
Posts: 18
|
One more thing, the printers are installed just fine using the code abovewhen logging in from a local ws, but when I login from Citrix, printers are not installed because I think it's picking up the Citrix server name instead of ws name. Any thought on how-to make it work...
Thanks!
|
|
Top
|
|
|
|
#165616 - 2006-08-09 02:28 AM
Re: Install Printers by Computer Names
|
hieucao
Fresh Scripter
Registered: 2006-08-09
Posts: 18
|
Les, NTDOC, can you please point me to the FAQ link for this topic as I am having trouble finding it. When I click on the FAQ above the tread, it contains only how-to use this forum.
Please help. Thank you!
|
|
Top
|
|
|
|
#165617 - 2006-08-09 02:34 AM
Re: Install Printers by Computer Names
|
Les
KiX Master
   
Registered: 2001-06-11
Posts: 12734
Loc: fortfrances.on.ca
|
Use the board search http://www.kixtart.org/ubbthreads/search.php?Cat= and search for Citrix in the KiXtart FAQ and HowTo's forum.
|
|
Top
|
|
|
|
#165618 - 2006-08-09 02:37 AM
Re: Install Printers by Computer Names
|
hieucao
Fresh Scripter
Registered: 2006-08-09
Posts: 18
|
Got it! Thank You!
|
|
Top
|
|
|
|
#165620 - 2006-08-09 07:06 AM
Re: Install Printers by Computer Names
|
Witto
MM club member
   
Registered: 2004-09-29
Posts: 1828
Loc: Belgium
|
Code:
If Not @TSSESSION $ComputerName = @WKSTA Else $ComputerName = %CLIENTNAME% EndIf Select Case Left($ComputerName,2) = "FA" $ = AddPrinterConnection("\\Server\PrinterA") Case Left($ComputerName,2) = "FB" $ = AddPrinterConnection("\\Server\PrinterB") EndSelect
|
|
Top
|
|
|
|
#165621 - 2006-08-09 07:36 PM
Re: Install Printers by Computer Names
|
hieucao
Fresh Scripter
Registered: 2006-08-09
Posts: 18
|
Thanks, Witto!!! Your code worked great on both workstation and in Citrix!
|
|
Top
|
|
|
|
#165623 - 2006-08-09 08:47 PM
Re: Install Printers by Computer Names
|
hieucao
Fresh Scripter
Registered: 2006-08-09
Posts: 18
|
Witto - Just another thought, can specific printers be installed by specific subnet only?
Thanks much.
|
|
Top
|
|
|
|
#165625 - 2006-08-09 09:11 PM
Re: Install Printers by Computer Names
|
hieucao
Fresh Scripter
Registered: 2006-08-09
Posts: 18
|
Great, Jooel - is it possible if you can post the code? I am a newbie in KIX but so far KIX has been working great with eveyone's help.
Thanks.
|
|
Top
|
|
|
|
Moderator: Jochen, Allen, Radimus, Glenn Barnas, ShaneEP, Ruud van Velsen, Arend_, Mart
|
0 registered
and 809 anonymous users online.
|
|
|