[THIN] Re: VB ??

  • From: "Guzzo, Mark A \(Mark\)" <guzzo@xxxxxxxxxx>
  • To: <thin@xxxxxxxxxxxxx>
  • Date: Tue, 12 Sep 2006 07:47:26 -0500

Thanks...

 

I'll check into that.

 

M a r k G u z z o  

________________________________

From: thin-bounce@xxxxxxxxxxxxx [mailto:thin-bounce@xxxxxxxxxxxxx] On
Behalf Of BRUTON, Malcolm, GBM
Sent: Tuesday, September 12, 2006 2:25 AM
To: 'thin@xxxxxxxxxxxxx'
Subject: [THIN] Re: VB ??

 

We find it easy to dump all users groups to an array and then do a
lookup on that.  If you check the users local token it is nice and fast.
Again.  Lots of code snippets on web...

        -----Original Message-----
        From: thin-bounce@xxxxxxxxxxxxx
[mailto:thin-bounce@xxxxxxxxxxxxx] On Behalf Of Moock, Jay
        Sent: 11 September 2006 18:45
        To: thin@xxxxxxxxxxxxx
        Subject: [THIN] Re: VB ??

        Found this on the net somewhere.  It returns a boolean.

         

         

        Set objNetwork = CreateObject("Wscript.Network")

         

        strNTName = objNetwork.userName

         

        Set objUser = GetObject("WinNT://" & strNetBIOSDomain & "/" &
strNTName & ",user")

         

        IsMember("Group Name")

         

         

        Function IsMember(strGroup)
        ' Function to test for user group membership.
        ' strGroup is the NT name (sAMAccountName) of the group to test.
        ' objGroupList is a dictionary object, with global scope.
        ' Returns True if the user is a member of the group.

         

          If IsEmpty(objGroupList) Then
            Call LoadGroups
          End If
          IsMember = objGroupList.Exists(strGroup)
        End Function

         

         

        Sub LoadGroups
        ' Subroutine to populate dictionary object with group
memberships.
        ' objUser is the user object, with global scope.
        ' objGroupList is a dictionary object, with global scope.

         

          Dim objGroup
          Set objGroupList = CreateObject("Scripting.Dictionary")
          objGroupList.CompareMode = vbTextCompare
          For Each objGroup In objUser.Groups
            objGroupList(objGroup.name) = True
          Next
          Set objGroup = Nothing
        End Sub

                -----Original Message-----
                From: thin-bounce@xxxxxxxxxxxxx
[mailto:thin-bounce@xxxxxxxxxxxxx] On Behalf Of Guzzo, Mark A (Mark)
                Sent: Monday, September 11, 2006 1:37 PM
                To: thin@xxxxxxxxxxxxx
                Subject: [THIN] VB ??

                Hello all,

                 

                I was ask to start converting my kixtart logon Citrix
scripts to VB and so I have one hugh question. Is there a simple
InGroup() function for VB like there is for kixtart? I have Googled this
and only seem to come up with user defind functions for this and they
all seem to come up short. Does anyone have a simple but effective code
sinp they can share please?

                 

                I'm a VB newbee ;-)

                 

                Thanks...

                 

                M a r k G u z z o 

                Utility Infrastructure Services 

                Citrix / VMware Administrator 

                Lucent Technologies 

                2601 Lucent Ln, Lisle, IL 60532-3640 

                RM:52N15 W/F:630.979.9731 

                 

 
************************************************************************
***********
The Royal Bank of Scotland plc. Registered in Scotland No 90312.
Registered Office: 36 St Andrew Square, Edinburgh EH2 2YB. 
Authorised and regulated by the Financial Services Authority 
 
This e-mail message is confidential and for use by the 
addressee only. If the message is received by anyone other 
than the addressee, please return the message to the sender 
by replying to it and then delete the message from your 
computer. Internet e-mails are not necessarily secure. The 
Royal Bank of Scotland plc does not accept responsibility for 
changes made to this message after it was sent. 
 
Whilst all reasonable care has been taken to avoid the 
transmission of viruses, it is the responsibility of the recipient to 
ensure that the onward transmission, opening or use of this 
message and any attachments will not adversely affect its 
systems or data. No responsibility is accepted by The 
Royal Bank of Scotland plc in this regard and the recipient should carry

out such virus and other checks as it considers appropriate. 
Visit our websites at: 
http://www.rbos.com
http://www.rbsmarkets.com 
************************************************************************
***********

Other related posts: