Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Set local printer as default on logon?

Status
Not open for further replies.

Leozack

MIS
Oct 25, 2002
867
GB
Hi all. I posted this up here also :

Is there an easy way (pref kixscript) to set any local printer as default? Currently I use machinename matching to set the default printer to the nearest network printer. But if a PC is hosting that printer, then it only has the local 'version' not the network 'version' so thus can't set the network 'version' as default, eg pc1 can't set \\pc1\printer1 as default, other pcs can.

I'd like to set the printers as I do now but after that check and if there's a local one (not the stupid pdf ones or MS document imaging ones) then make that default instead.

_________________________________
Leozack
Code:
MakeUniverse($infinity,1,42);
 
I am not 100% sure as to what you are trying to accomplish. But it is great to know that you are using KiX.

I would personally create AD groups to determine which printers are installed and set as default.

If I am understanding you correctly, I think this may be of some help:

Hopefully this helps.
 
Funny - I read that post before posting over at because I still didn't figure it out, couldn't find a simple way to enumerate the ones in the registry or whatever. And he's doing it the opposite way I want to - I wanted to look for a local printer and make it default if it's there (a real one) after doing all the network stuff.
I've seen printers in AD but never looked into how to use AD to add them and set defaults etc. Is it as simple/reliable as kixscripting is?
(I wish you could set timeouts for connection attempts though as 1 site had multiple locally hosted printers and if half those pcs were off you'd spend a while failing to connect to them all, holding up logging on)

_________________________________
Leozack
Code:
MakeUniverse($infinity,1,42);
 
Sorry it took so long for me to respond.
You may want to evaluate and revisit the policies and procedures for your IT Systems. You may want to set company policies saying never shut down computers, only log off or lock. This way you can ensure that the printers will be accessible. You might also want to look at moving to network capable printers and a real print server. This would be the most beneficial option in my eyes. Here is a KiX example that I used to set up the printers based on Active Directory:
Code:
/* ------ Add Printers For Everyone ------ */
ADDPRINTERCONNECTION("\\<PRINT SERVER>\Human Resources Panasonic 3510") = 0
ADDPRINTERCONNECTION("\\<PRINT SERVER>\Panasonic 6530") = 0


/* ------ Add Printers For Administrative ------ */
IF INGROUP("Administrative Reports") = 1
	ADDPRINTERCONNECTION("\\<PRINT SERVER>\SusanWed") = 0
	ADDPRINTERCONNECTION("\\<PRINT SERVER>\AuroraEx") = 0
ENDIF

/* ------ Add Printers For AP ------ */
IF INGROUP("AP") = 1
	ADDPRINTERCONNECTION("\\<PRINT SERVER>\Accounts Payable PCL") = 0
ENDIF

/* ------ Add Printers For AR ------ */
IF INGROUP("AR") = 1
	ADDPRINTERCONNECTION("\\<PRINT SERVER>\Accounts Receivable HP 2300") = 0
	ADDPRINTERCONNECTION("\\<PRINT SERVER>\AR Director") = 0
	ADDPRINTERCONNECTION("\\<PRINT SERVER>\AR") = 0
ENDIF

/* ------ Add Printers For Check Printers ------ */
IF INGROUP("Check Printers") = 1
	ADDPRINTERCONNECTION("\\<PRINT SERVER>\Check Printer 1 HP Laser4300") = 0
	ADDPRINTERCONNECTION("\\<PRINT SERVER>\Check Printer 2 HP Laser4300") = 0
ENDIF

/* ------ Add Printers For Color Laser ------ */
IF INGROUP("Color Laser Printers") = 1
	ADDPRINTERCONNECTION("\\<PRINT SERVER>\Color Laser") = 0
ENDIF

/* ------ Add Printers For GL ------ */
IF INGROUP("GL") = 1
	ADDPRINTERCONNECTION("\\<PRINT SERVER>\GL Printer") = 0
	ADDPRINTERCONNECTION("\\<PRINT SERVER>\GL2 Printer") = 0
ENDIF

/* ------ Add Printers For HR ------ */
IF INGROUP("HR") = 1
	ADDPRINTERCONNECTION("\\<PRINT SERVER>\Human Resources HP2300") = 0
ENDIF

/* ------ Add Printers For Payroll ------ */
IF INGROUP("PR") = 1
	ADDPRINTERCONNECTION("\\<PRINT SERVER>\Payroll") = 0
ENDIF

/* ------ Add Printers For Purchasing ------ */
IF INGROUP("PO") = 1
	ADDPRINTERCONNECTION("\\<PRINT SERVER>\Purchasing") = 0
ENDIF

/* ------ Add Printers For QA ------ */
IF INGROUP("QA","QA Assistants") = 1
	ADDPRINTERCONNECTION("\\<PRINT SERVER>\QAPrinter") = 0
	ADDPRINTERCONNECTION("\\<PRINT SERVER>\QA Assistant") = 0
	ADDPRINTERCONNECTION("\\<PRINT SERVER>\QA Back") = 0
ENDIF

QUIT
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top