Problem I am having is that specific set of registry keys needs to be in place before a published app launches but the published app is launching before appsense has a chance to completely apply them. I tried setting the key at logon but that didn’t work.
I have tried setting them when the process is launched but that didn’t work either. It sets the keys but the application has already launched and determined the settings in the key.
Don’t want to give the user’s a full desktop for a number of reasons.
So I started looking through the “AppSense Environment Manager Actions and Conditions Scripting Guide”. Sadly they didn’t have anything in there for scripting user based actions. So I ended up getting lucky. Well I guess it was more of a process of elimination. AppSense documented different ways to script getting the Computer OU information but not the User. In the document it said that the EmClient.ClientComputerOUCondition utilizes the EMComputerConditions.dll. I saw that there was a EMUserConditions.dll in the install folder, so after several attempts I was able to make this script work.
I am just included their script with a few changes to get the User OU information.
Dim obj, s
Set obj = CreateObject(“EmClient.UserOUCondition”)
obj.Operator = 1 ‘ Equals
obj.Scope = 2 ‘ Subtree
obj.OU = “OU=OU_NAME,DC=DOMAIN,DC=com”
If obj.Evaluate(“”) Then s = ” is ” Else s = ” is not ” End If
MsgBox “User” & s & “in the the OU”
Set obj = Nothing
After that I was able to put together a script; so when a user launches a published application from citrix, it will call this script. The script does a quick check based on what OU they are in and then calls a .reg key and imports the key. Waits a few seconds then launches the application.