Hi All,

So my problem is thus, I have an application that requires either of two URL's to be launched depending on what ad group a person is in.


For example, John is in one of 7 possible groups so he gets the UAT URL and Sarah is in one of a seperate 7 AD groups o she gets the PROD url.


Can I get App-V to creat one shortcut and with the help of some logic query the AD Groups and launch whichever URL?


I've been playing around with the Idea of having the shorcut point to a VBScript that checks the Memebership and in turn launches the URL.




0 Comments   [ + ] Show Comments


Please log in to comment

Community Chosen Answer


Option Explicit

On Error Resume Next

Dim objShell,URL_1, URL_2, groupListD, groupName, ADSPath, userPath
Dim variable

set objShell = WScript.CreateObject("WScript.Shell")


If isMember("Group1") Then      
 objShell.Run URL_1
ElseIf isMember("Group2") Then      
 objShell.Run URL_2
End If

Function IsMember(groupName)    

 If IsEmpty(groupListD) then        
  Set groupListD = CreateObject("Scripting.Dictionary")        
  groupListD.CompareMode = 1        
  ADSPath = EnvString("userdomain") & "/" & EnvString("username")        
  Set userPath = GetObject("WinNT://" & ADSPath & ",user")        
  For Each listGroup in userPath.Groups            
   groupListD.Add listGroup.Name, "-"       
 End if    
IsMember = CBool(groupListD.Exists(groupName))

End Function

Function EnvString(variable)    
variable = "%" & variable & "%"   
EnvString = objShell.ExpandEnvironmentStrings(variable)

End Function

Set objShell = Nothing
Set groupListD = Nothing
Set userPath = Nothing


Answered 07/30/2012 by: jagadeish
Red Belt

Please log in to comment



Just push iexplore "URL" GPO's based on the context they are in.


Answered 07/30/2012 by: SMal.tmcc
Red Belt

Please log in to comment

Thanks Guys

Answered 07/31/2012 by: Automan
Senior Yellow Belt

  • If your problem was solved could you mark it as answered. Thanks
Please log in to comment

Nice Script Jagadeish..

Answered 07/31/2012 by: piyushnasa
Red Belt

  • very impressive, I voted for it
Please log in to comment

The script is really good but if you want to manage the shortcut and pull it back later, or have the option to, in an enterprise the GPP application shortcut is the way to go. You can use custom item-level target filters in the GPP application shortcut to limit who can see the URL link based on AD membersship and a lot of things like OS, RAM, free space, etc...


Answered 08/01/2012 by: AgentMrQ
Senior White Belt

Please log in to comment
Answer this question or Comment on this question for clarity