Page 1 of 1 1
Topic Options
#201639 - 2011-02-23 06:36 PM How do I set a default printer per PC?
Danny_H Offline
Just in Town

Registered: 2011-02-17
Posts: 3
Loc: MN, USA
Hello,
I need to modify my script to set a default printer for ANYONE who logs into a specific PC -- what is the syntax for that? Most of our script sets printers based upon the group that a user belongs to but this is the first case where we need it set for a specific PC.

Thanks,
Dan

Top
#201640 - 2011-02-23 06:41 PM Re: How do I set a default printer per PC? [Re: Danny_H]
Allen Administrator Online   shocked
KiX Supporter
*****

Registered: 2003-04-19
Posts: 4510
Loc: USA
something like

 Code:
if @wksta
  $rc=setdefaultprinter()
endif

Top
#201641 - 2011-02-23 06:46 PM Re: How do I set a default printer per PC? [Re: Allen]
Danny_H Offline
Just in Town

Registered: 2011-02-17
Posts: 3
Loc: MN, USA
What does the $rc mean?
Top
#201642 - 2011-02-23 06:50 PM Re: How do I set a default printer per PC? [Re: Danny_H]
Allen Administrator Online   shocked
KiX Supporter
*****

Registered: 2003-04-19
Posts: 4510
Loc: USA
See if this FAQ answers that for you:

Why does the console display zeros and ones (amongst others)?
http://www.kixtart.org/forums/ubbthreads.php?ubb=showflat&Number=81941#Post81941

Here are all of the FAQs.
http://www.kixtart.org/forums/ubbthreads.php?ubb=postlist&Board=5&page=1

Top
#201643 - 2011-02-23 07:08 PM Re: How do I set a default printer per PC? [Re: Allen]
Allen Administrator Online   shocked
KiX Supporter
*****

Registered: 2003-04-19
Posts: 4510
Loc: USA
Oops! In my first response I forgot one important element, the second part of the if statement where it checks for the computername.

 Code:
if @wksta = "TheComputerName"
  $rc=setdefaultprinter()
endif


Top
#201644 - 2011-02-23 07:13 PM Re: How do I set a default printer per PC? [Re: Allen]
Danny_H Offline
Just in Town

Registered: 2011-02-17
Posts: 3
Loc: MN, USA
Thanks, I am going to test it now...
Top
Page 1 of 1 1


Moderator:  Jochen, Allen, Radimus, Glenn Barnas, ShaneEP, Ruud van Velsen, Arend_, Mart 
Hop to:
Shout Box

Who's Online
0 registered and 186 anonymous users online.
Newest Members
dimi575, Drecksnacken, Nlill, webtools321, multiman
17734 Registered Users

Generated in 0.032 seconds in which 0.012 seconds were spent on a total of 13 queries. Zlib compression enabled.

Search the board with:
superb Board Search
or try with google:
Google
Web kixtart.org