Danny_H
(Just in Town)
2011-02-23 06:36 PM
How do I set a default printer per PC?

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


AllenAdministrator
(KiX Supporter)
2011-02-23 06:41 PM
Re: How do I set a default printer per PC?

something like

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


Danny_H
(Just in Town)
2011-02-23 06:46 PM
Re: How do I set a default printer per PC?

What does the $rc mean?

AllenAdministrator
(KiX Supporter)
2011-02-23 06:50 PM
Re: How do I set a default printer per PC?

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


AllenAdministrator
(KiX Supporter)
2011-02-23 07:08 PM
Re: How do I set a default printer per PC?

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



Danny_H
(Just in Town)
2011-02-23 07:13 PM
Re: How do I set a default printer per PC?

Thanks, I am going to test it now...