[THIN] Re: ifmember and Usrlogon.cmd

  • From: "Braebaum, Neil" <Neil.Braebaum@xxxxxxxxxxxxxxxxx>
  • To: <thin@xxxxxxxxxxxxx>
  • Date: Wed, 8 Jun 2005 08:47:27 +0100

Yup it does cache group membership info in the registry.

WSH zealots tend to do similar with dictionary objects within a script.

Neil 

> -----Original Message-----
> From: thin-bounce@xxxxxxxxxxxxx 
> [mailto:thin-bounce@xxxxxxxxxxxxx] On Behalf Of Hutchinson, Alan
> Sent: 07 June 2005 09:57
> To: thin@xxxxxxxxxxxxx
> Subject: [THIN] Re: ifmember and Usrlogon.cmd
> 
> If I remember correctly using ingroup from KiX  does one 
> enumeration of group membership for the user and stores all 
> groups that the user is a member of, so evaluation of 
> subsequent ingroup queries is faster.
> Ifmember performs a query each time it is called.
> 
> On another note, I would personally use KiX in this instance 
> as I find it relatively easy to debug (there is a /d command 
> line option for debug mode).
> 
> Regards,
> 
> Alan.
> 
> -----Original Message-----
> From: thin-bounce@xxxxxxxxxxxxx 
> [mailto:thin-bounce@xxxxxxxxxxxxx] On Behalf Of Braebaum, Neil
> Sent: 06 June 2005 16:40
> To: thin@xxxxxxxxxxxxx
> Subject: [THIN] Re: ifmember and Usrlogon.cmd
> 
> In fairness, he did say "where your user would only fall into 
> one category".
> 
> I've had a mix of both in some scripts - for some instances, 
> where select...case makes sense, and others where there can 
> be cumulative group memberships, plenty of ifs.
> 
> It's a reasonable thing to mention, though - because 
> sometimes there's no thought and countless ifs, where a 
> select...case statement would be better.
> 
> Neil 
> 
> > -----Original Message-----
> > From: thin-bounce@xxxxxxxxxxxxx
> > [mailto:thin-bounce@xxxxxxxxxxxxx] On Behalf Of Joe Shonk
> > Sent: 06 June 2005 16:24
> > To: thin@xxxxxxxxxxxxx
> > Subject: [THIN] Re: ifmember and Usrlogon.cmd
> > 
> > But even then, a Select..Case is one and out.   What if the 
> > users is part of
> > several groups (Say "Accounting" and "Management")?
> > 
> > -----Original Message-----
> > From: thin-bounce@xxxxxxxxxxxxx
> > [mailto:thin-bounce@xxxxxxxxxxxxx] On Behalf Of Walter, Chris
> > Sent: Monday, June 06, 2005 8:21 AM
> > To: 'thin@xxxxxxxxxxxxx'
> > Subject: [THIN] Re: ifmember and Usrlogon.cmd
> > 
> > I agree, you should use some sort of scripting tool for you login 
> > scripts.
> > I would also look at using a Select..Case statement where your user 
> > would only fall into one category instead of running 
> through many IF 
> > Statements.
> > 
> > Chris
> > 
> > -----Original Message-----
> > From: thin-bounce@xxxxxxxxxxxxx
> > [mailto:thin-bounce@xxxxxxxxxxxxx] On Behalf Of Matthew Shrewsbury
> > Sent: Monday, June 06, 2005 10:47 AM
> > To: thin@xxxxxxxxxxxxx
> > Subject: [THIN] Re: ifmember and Usrlogon.cmd
> > 
> > Kix is easier I think, but personally I'd use WSH Javascript.
> > 
> > Here is a simple kix example.
> > 
> > IF INGROUP ("domain users")
> >   USE G: /DEL
> >   USE G: "\\Server\Share" 
> > ENDIF       
> > 
> > Matthew Shrewsbury, MCSE+Internet MCSE 2000 CCA Server+ 
> Senior Network 
> > Administrator -----Original Message-----
> > From: thin-bounce@xxxxxxxxxxxxx
> > [mailto:thin-bounce@xxxxxxxxxxxxx] On Behalf Of msemon@xxxxxxx
> > Sent: Monday, June 06, 2005 10:42 AM
> > To: thin@xxxxxxxxxxxxx
> > Subject: [THIN] ifmember and Usrlogon.cmd
> > 
> > Trying to remember the syntax to map a bunch of groups with 
> > ifmember.exe in Usrlogon.cmd file. So far I have something 
> like this:
> > 
> > 
> > echo off
> > 
> > ifmember hr
> > if errorlevel 1 goto hr
> > 
> > ifmember marketing
> > if errorlevel 1 goto marketing
> > 
> > ifmember administrators
> > if errorlevel 1 goto administrators
> > 
> > goto end
> > 
> > :hr
> > net use M: \\server1\hr_share$
> > goto end
> > 
> > :marketing
> > net use N: \\server1\marketing_share$
> > goto end
> > 
> > :administrators
> > net use O: \\server1\admin_share$
> > goto end
> > 
> > :end
> > Exit
> > 
> > Anyone have a better way of doing this?
> > 
> > Thanks,
> > 
> > Mike


*****************************************************************************
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 Group Limited or 
its subsidiaries. Please note that e-mail communications may be monitored. The 
Registered Office of Littlewoods Group Limited and its subsidiaries is 100 Old 
Hall Street, Liverpool, L70 1AB. Registered number of Littlewoods Group Limited 
is 5059352.
*****************************************************************************




This message has been scanned for viruses by BlackSpider MailControl - 
www.blackspider.com
********************************************************
This Weeks Sponsor: ThinPrint GmbH
Now available: The new version .print Engine 6.2 with SSL encryption
and certificate management.
http://www.thinprint.com
**********************************************************
Useful Thin Client Computing Links are available at:
http://thin.net/links.cfm
ThinWiki community - Excellent 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: