From: CALLUM Mac on

Hi

I want to deploy a shortcut using the IsMember to 6 different security groups

I've used the following to deploy to a single group, how can I include 6
different groups?

If IsMember(strUserName, "Group1") = 1 Then
StrShortCutName = "Group1)
FSO.copyFile strStartMenuShortcutsFolder & strShortCutName & ".lnk"
FlogFile.WriteLine(StrShortCutName & " Shortcut Created,")
From: Matthias Tacke on
CALLUM Mac wrote:
> Hi
>
> I want to deploy a shortcut using the IsMember to 6 different security groups
>
> I've used the following to deploy to a single group, how can I include 6
> different groups?
>
> If IsMember(strUserName, "Group1") = 1 Then
> StrShortCutName = "Group1)
> FSO.copyFile strStartMenuShortcutsFolder & strShortCutName & ".lnk"
> FlogFile.WriteLine(StrShortCutName & " Shortcut Created,")

It's unclear to me if you want to create one shortcut or one for every
group the user is member of?

In general

arrGroups = Array("Group1","Group2")
For Each strGroup In arrGroups
If (IsMember(strUserName, strGroup) = True) Then ...
Next


--
HTH
Matthias
From: CALLUM Mac on
Hello

Thanks for responding.

I have 6 security groups based on their respective department. I want to
deploy a shortcut to each department based on their group membership

I've since found that these 6 groups contain nested groups and that the
IsMember function does not support nested groups.

What is the best way to deploy the shortcut to security groups which contain
nested groups?



"Matthias Tacke" wrote:

> CALLUM Mac wrote:
> > Hi
> >
> > I want to deploy a shortcut using the IsMember to 6 different security groups
> >
> > I've used the following to deploy to a single group, how can I include 6
> > different groups?
> >
> > If IsMember(strUserName, "Group1") = 1 Then
> > StrShortCutName = "Group1)
> > FSO.copyFile strStartMenuShortcutsFolder & strShortCutName & ".lnk"
> > FlogFile.WriteLine(StrShortCutName & " Shortcut Created,")
>
> It's unclear to me if you want to create one shortcut or one for every
> group the user is member of?
>
> In general
>
> arrGroups = Array("Group1","Group2")
> For Each strGroup In arrGroups
> If (IsMember(strUserName, strGroup) = True) Then ...
> Next
>
>
> --
> HTH
> Matthias
>
From: Matthias Tacke on
CALLUM Mac wrote:
> Hello
>
> Thanks for responding.
>
> I have 6 security groups based on their respective department. I want to
> deploy a shortcut to each department based on their group membership
>
> I've since found that these 6 groups contain nested groups and that the
> IsMember function does not support nested groups.
>
> What is the best way to deploy the shortcut to security groups which contain
> nested groups?
>

There are variants of the IsMember Function available.

Search Google with the keywords: vbscript IsMember nested groups
<http://www.google.com/search?q=vbscript+ismember+nested+groups>

The first very informative entry is:
<http://www.rlmueller.net/freecode2.htm>

--
HTH
Matthias
From: Al Dunbar on

"Matthias Tacke" <Matthias(a)Tacke.de> wrote in message
news:gma210$q5o$1(a)news.albasani.net...
> CALLUM Mac wrote:
>> Hello
>>
>> Thanks for responding. I have 6 security groups based on their respective
>> department. I want to deploy a shortcut to each department based on their
>> group membership
>>
>> I've since found that these 6 groups contain nested groups and that the
>> IsMember function does not support nested groups.
>>
>> What is the best way to deploy the shortcut to security groups which
>> contain nested groups?
>>
>
> There are variants of the IsMember Function available.
>
> Search Google with the keywords: vbscript IsMember nested groups
> <http://www.google.com/search?q=vbscript+ismember+nested+groups>
>
> The first very informative entry is:
> <http://www.rlmueller.net/freecode2.htm>

but perhaps a better resource is:

http://www.rlmueller.net/freecode1.htm

/Al


 | 
Pages: 1
Prev: xcopy ftp
Next: Run command problem in vbs