[THIN] Re: SV: Selecting default printer

  • From: Spriggs Jon <Jon.Spriggs@xxxxxxxxxxxxxx>
  • To: thin@xxxxxxxxxxxxx
  • Date: Thu, 16 Dec 2004 13:49:46 -0000

OK, I've got a site with three different departments (Site LON, Dept. A B
and C) and a site with two different departments (Site EDI, Dept. A and C).
LON/A has 25 staff and two printers, LON/B has 5 staff and 1 printer and
LON/C has 10 staff and 1 printer. EDI/A has 10 staff and 3 printers, EDI/C
has 5 staff and uses EDI/A's printer. Each team has a manager, EDI/A also
comprises of the helpdesk called EDI/A/Helpdesk, who want to use just 1 of
the 3 printers.

Currently, our login script checks the OU of the staff (company.local/member
servers/terminal servers/users/site/dept) and the DC they've authenticated
against to check which site they're at. Once it's got that, it checks that
against a series of text files to see which printers they should be mapping
against. If there's already a printer mapped as default (checks Registry Key
HKCU\Software\Microsoft\Windows NT\CurrentVersion\Windows\DefChanged), it
removes all the printers and maps all those that OU should have access to.
If the default printer that was there before is not one of the printers that
OU uses, it prompts for a new default printer from the text file.

So, how do you tidy that up, so that it's a bit less unwieldy (currently 430
lines of code)? All our printers are created on the local W2K DC (LONDC01 or
EDIDC01), and as a result, it doesn't appear we can also add them in the AD,
as they are already created on the DC.

Any advice or guidance would be *really* helpful...

Thanks,

Jon Spriggs
-- 
The presence of a "Fujitsu" address does not imply or assume that Fujitsu
Services, Fujitsu or any other company containing the Fujitsu name uses or
endorses this product. This email is purely a personal opinion.

-----Original Message-----
From: Braebaum, Neil [mailto:Neil.Braebaum@xxxxxxxxxxxxxxxxx] 
Sent: 16 December 2004 12:48
To: thin@xxxxxxxxxxxxx
Subject: [THIN] Re: SV: Selecting default printer


What tips would you like?

I've sort of sketched how I do it  - but some of that is based around other
constraints (like the OU structure for PC object, being largely dictated for
application deployment reasons).

Neil

> -----Original Message-----
> From: thin-bounce@xxxxxxxxxxxxx
> [mailto:thin-bounce@xxxxxxxxxxxxx] On Behalf Of Spriggs Jon
> Sent: 16 December 2004 12:39
> To: thin@xxxxxxxxxxxxx
> Subject: [THIN] Re: SV: Selecting default printer
> 
> Perhaps it was just my script then :)
> 
> If you've got some tips on using the AD for mapping printers,
> I'd be grateful for that info :)
> 
> -----Original Message-----
> From: Braebaum, Neil [mailto:Neil.Braebaum@xxxxxxxxxxxxxxxxx]
> Sent: 16 December 2004 11:38
> To: thin@xxxxxxxxxxxxx
> Subject: [THIN] Re: SV: Selecting default printer
> 
> Comments inline
> 
> > -----Original Message-----
> > From: thin-bounce@xxxxxxxxxxxxx
> [mailto:thin-bounce@xxxxxxxxxxxxx] On
> > Behalf Of Spriggs Jon
> > Sent: 16 December 2004 11:27
> > To: thin@xxxxxxxxxxxxx
> > Subject: [THIN] Re: SV: Selecting default printer
> > 
> > Niclas:
> > 
> > We've got a script which does that per OU, but it gets REALLY
> > unweildy, really quickly. You'd be better off using groups and a 
> > vbscript, then you can almost dynamically assign a user to 
> a printer,
> > without having to worry about moving the users from OU to OU.
> 
> I disagree.
> 
> The structure of Active Directory, and it's very purpose *is*
> being the repository for this information, as opposed to the 
> legacy NT style thing of having countless groups and printers 
> defined in login scripts.
> 
> I use AD structure for printer assignment, and do it
> leveraging the OU structure (have done for some years, now) 
> so as a means to provide printer mapping based on the 
> hardware location of the PC the user is on, as opposed to a 
> *users* group membership.
> 
> What I don't do, though, is group printers all within a users
> OU - I use the location field for the PC object to point to 
> the OU where the printers reside for that location (I also 
> wrote a HTA so that our PC maintainers can create / update PC 
> objects in correct OUs, with appropriate group memberships, 
> and with locations fields pointing to the appropriate OUs).
> 
> The point being, though, that AD should be the repository -
> that's why it's there. With the NT domain model, you have no 
> other real option than hardcoding countless groups and 
> printers within login scripts, but with a directory, you now 
> have better options.
> 
> Neil

***********************************************
This e-mail and its attachments are confidential
and are intended for the above named recipient
only. If this has come to you in error, please 
notify the sender immediately and delete this 
e-mail from your system.
You must take no action based on this, nor must 
you copy or disclose it or any part of its contents 
to any person or organisation.
Statements and opinions contained in this email may 
not necessarily represent those of Littlewoods.
Please note that e-mail communications may be monitored.
The registered office of Littlewoods Limited and its subsidiaries is 100 Old
Hall Street, Liverpool, L70 1AB. Registered number of Littlewoods Limited is
262152.
************************************************

********************************************************
This Weeks Sponsor SeamlessPlanet.com Domain Names
Register your .com domain name for as low as $7.85
One of the lowest prices on the web! Part of The Kenzig Group.
http://www.seamlessplanet.com
********************************************************** 
Useful Thin Client Computing Links are available at:
http://thin.net/links.cfm ThinWiki community - Awesome SBC Search
Capabilities! http://www.thinwiki.com
***********************************************************
For Archives, to Unsubscribe, Subscribe or 
set Digest or Vacation mode use the below link:
http://thin.net/citrixlist.cfm
********************************************************
This Weeks Sponsor SeamlessPlanet.com Domain Names
Register your .com domain name for as low as $7.85
One of the lowest prices on the web! Part of The Kenzig Group.
http://www.seamlessplanet.com
********************************************************** 
Useful Thin Client Computing Links are available at:
http://thin.net/links.cfm
ThinWiki community - Awesome SBC Search Capabilities!
http://www.thinwiki.com
***********************************************************
For Archives, to Unsubscribe, Subscribe or 
set Digest or Vacation mode use the below link:
http://thin.net/citrixlist.cfm

Other related posts: