Page 1 of 1 1
Topic Options
#149991 - 2005-10-14 01:58 PM default printers by machine name
Duke999 Offline
Fresh Scripter

Registered: 2005-09-20
Posts: 13
Hello everyone,
Is it possible to set a default printer to a range of terminals by their netbios names.
We have a school that needs the printer in each classroom to be the default for the wyse termainls in that room.

Thanks

Top
#149992 - 2005-10-14 02:17 PM Re: default printers by machine name
Richard H. Administrator Offline
Administrator
*****

Registered: 2000-01-24
Posts: 4946
Loc: Leatherhead, Surrey, UK
Sure. Keep a file an INI file on your Netlogon share with the default printer name in it and key the entry by the client name.

I'm assuming as you've said that these have NetBIOS names that they are some sort of WinCE device rather than the older WyseTerm thin clients?

Anyhoo, your ini file will look something like:
Code:
[PRINTER]
WYSETERM001=\\server\printer1
WYSETERM002=\\server\printer2
...



You can get the default printer with:
Code:
$sDefaultPrinter=ReadProfileString(@SERVER+"\Netlogon+"\Printers.ini","PRINTER",%CLIENTNAME%)



If the NetBIOS names include the room number then it becomes even easier.

Top
#149993 - 2005-10-14 02:39 PM Re: default printers by machine name
Duke999 Offline
Fresh Scripter

Registered: 2005-09-20
Posts: 13
Thanks Richard.
They are embedded XP terminals.
So all I have to do is create an ini file like this so all wyse boxes in say classroom1 will default to printer1
room1print.ini
wysenc01=\\server\printer1
wysenc02=\\server\printer1
etc

Then add in the kix script
$sDefaultPrinter=ReadProfileString(@SERVER+"\Netlogon+"\room1print.ini","PRINTER",%CLIENTNAME%)

Top
#149994 - 2005-10-14 06:47 PM Re: default printers by machine name
StarwarsKid Offline
Seasoned Scripter
*****

Registered: 2005-06-15
Posts: 506
Loc: Oregon, USA
Duke, I also had this question. I was able to create geographical printer assignments based on computer names. Here's a link to a thread with the code for the KiXtart script and the INI file.
(Just as an extra to what Richard H. already posted)
http://www.kixtart.org/ubbthreads/showflat.php?Cat=0&Number=146079&an=&page=0&vc=1
_________________________
let the wise listen and add to their learning,
and let the discerning get guidance- Proverbs 1:5

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
1 registered (Allen) and 271 anonymous users online.
Newest Members
Sir_Barrington, batdk82, StuTheCoder, M_Moore, BeeEm
17886 Registered Users

Generated in 0.049 seconds in which 0.022 seconds were spent on a total of 12 queries. Zlib compression enabled.

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