Home » appsense

Tag: appsense

WebEx Install on Citrix XenApp 6.5, PVS Image and Appsense 8.3

Problem: Our webex client would install on the xenapp image ok for any user, webex would connect and work ok first time, subsequent attempts to connect to a test meeting would crash the webex client.

Solution – Create a SYMLINK
Ensure that Appsense AM Agent is STOPPED before beginning the install. It was preventing the installation from completing 100% (even though you get no feedback that the install has failed)

Run the cisco webex client offline installation from the cisco website

Start the Appsense AM Agent

Create a (symlink) as WEBEX is stupid enough to install itself into c:\programdata\webex
to ensure all users had their own webex installation be sure to run the following command to creation a directory junction point.
h=userhomedrive or other personal drive they have full access to
mklink /D c:\programdata\webex\webex1124 h:\webex

Open Internet explorer and connect to www.webex.com/test-meeting.html and test the login – the client should open fine and connect

Solution – Already installed but broken:
Stop Appsense AM Agent
Run the webex offline installer and remove all components
Browse to c:\programdata and DELETE the webex folder
Now follow the ‘Solution – Fresh Install’ above.

Good luck!

Use Appsense Personalisation to capture Windows Automatic and Custom destinations

To backup the New windows 7 start menu ‘jump lists’ links for things like recent items for Word, excel etc open the EM Agent and get it to copy the following folders at log on and logoff

At Logon copy the following
\homeservershare%username%WINDOWSRecentAutomaticDestinations and \homeservershare%username%WINDOWSRecentCustomDestinations (including subfolders)
%APPDATA%MicrosoftWindowsRecentAutomaticDestinations and %APPDATA%MicrosoftWindowsRecentCustomDestinations

At logoff
Reverse the above process

Default user registry keys for citrix User Profile manager or Appsense Hive in and Out

These are the keys we imported and exported before finally using Appsense Personalisation

These were used in conjunction with a mandatory profile. Remember that a mandatory profile will not work well with I.E or user based certificates. There is another post here about changing the user to look like a ‘non mandatory’ user for the duration of their session so certificates work.


“HKEY_CURRENT_USERSoftwareMicrosoftWindows NTCurrentVersionWindows Messaging Subsystem”



“HKEY_CURRENT_USERSoftwareMicrosoftInternet Explorer”


“HKEY_CURRENT_USERSoftwareMicrosoftShared Tools”



“HKEY_CURRENT_USERPrinters” “HKEY_CURRENT_USERSoftwareMicrosoftActive Setup”









“HKEY_CURRENT_USERSoftwareMicrosoftWindowsCurrentVersionExplorerDiscardable” “HKEY_CURRENT_USERSoftwareMicrosoftWindowsCurrentVersionExplorerHideDesktopIcons” “HKEY_CURRENT_USERSoftwareMicrosoftWindowsCurrentVersionExplorerMenuOrder”

“HKEY_CURRENT_USERSoftwareMicrosoftWindowsCurrentVersionExplorerModules” “HKEY_CURRENT_USERSoftwareMicrosoftWindowsCurrentVersionExplorerNewShortcutHandlers” “HKEY_CURRENT_USERSoftwareMicrosoftWindowsCurrentVersionExplorerRunMRU”

“HKEY_CURRENT_USERSoftwareMicrosoftWindowsCurrentVersionExplorerSearchPlatform” “HKEY_CURRENT_USERSoftwareMicrosoftWindowsCurrentVersionExplorerSessionInfo”






“HKEY_CURRENT_USERSoftwareMicrosoftWindowsCurrentVersionExplorerDontShowMeThisDialogAgain” “HKEY_CURRENT_USERSoftwareMicrosoftWindowsCurrentVersionExplorerTypedPaths”


“HKEY_CURRENT_USERSoftwareMicrosoftWindowsCurrentVersionInternet Settings5.0”

“HKEY_CURRENT_USERSoftwareMicrosoftWindows NTCurrentVersionWindows”

Appsense Hiving for users Printers but default not saving?


we had migrated our desktop from Xenapp 5.0 on w2008 sp2 (non r2) to XenApp6.5 2008 R2. This included an upgrade to Appsense 8.3 and introduction of Appsense personalisation.

Older applications still left on the old desktop needed the printer settings from the new desktop.

We had to set our new Appsense EM to hive the printer settings to the users home drive. (which was the old way)

Then on the old desktop (which was already hiving) the printers would be imported.

Hiving HKCUPrinters

Printing directly from the old desktop to the printers in question already worked, so it was not driver or server related.



The old desktop and applications were getting the printers, but some apps would not get any printers and the default printer was not being set correctly.


You also need to hive out

HKCUSoftwareMicrosoftWindows NTCurrentVersionWindows

KeyName: Device

Type: REG_SZ

Data: \serverprinter,winspool,Ne00:

Older applications that ccould only see the default printer then worked, as did the default setting of the printer

(Thats assuming that the provided default printer was of course installed, its drivers available etc)


Path Examples:

Home Drive


“\servershare\usernameHIVEPATHRegistrySoftware{;bks}Microsoft{;bks}Windows NT{;bks}CurrentVersion{;bks}Windows.%domain%_%username%”




XenApp 6.5 PVS Generalise Script 2012

Copy of script used to further ‘generalize’ our XenApp servers before cloning via PVS


REM clear event logs

wevtutil cl System

wevtutil cl Security

wevtutil cl Application

wevtutil cl Setup

wevtutil cl “Forwarded Events”


REM Stop Edgesight and Delete database

net stop RsCorSvc

net stop FirebirdServerCSMInstance

del “C:ProgramDataCitrixSystem MonitoringDataRSDATR.FDB” /q

del “D:ProgramDataCitrixSystem MonitoringDataRSDATR.FDB” /q


REM stop Appsense Services and delete JUST the machine ID

net stop “AppSense Application Manager Agent”

net stop “AppSense Client Communications Agent”

net stop “AppSense EmCoreService”

net stop “AppSense Watchdog Service”

reg delete “HKEY_LOCAL_MACHINESOFTWAREAppSense TechnologiesCommunications Agent” /v “Group ID”

reg delete “HKEY_LOCAL_MACHINESOFTWAREAppSense TechnologiesCommunications Agent” /v “Machine ID”


REM Change EnableSecuritySignature value to 0 for drive mappings to modified down level clients (Win 2000) – this setting didnt work in just GPO.

reg delete “HKEY_LOCAL_MACHINESYSTEMCurrentControlSetservicesLanmanWorkstationParameters” /v “EnableSecuritySignature” /f

reg add “HKEY_LOCAL_MACHINESYSTEMCurrentControlSetservicesLanmanWorkstationParameters” /v “EnableSecuritySignature” /t REG_DWORD /d 0 /f

Add automatic launching of executable from IE in protected mode

When opening Internet explorer on XenApp 6.5 – we would get a prompt that a program is trying to open outside of Internet explorer’s protected mode.


This program will open outside of Protected mode. Internet Explorer’s Protected mode helps protect your computer. If you do not trust this website, do not open this program.

Name: Citrix FTA, URL VDA Redirector

Publisher: Citrix Systems, INC


http://support.citrix.com/article/CTX133274 – Use the citrix Article to disable the URL interceptor entirely, or

[HKEY_CURRENT_USERSoftwareMicrosoftInternet ExplorerLow RightsElevationPolicy{5196FFCF-C942-4E9B-AEDE-88DBF2E1DDE8}]
“AppPath”=”C:\Program Files (x86)\Citrix\system32”

Other applications can be added in here like Excel, Power point, word etc to enable the programs to open without prompting natively from IE’s protected mode.

Appsense EM xml Snippet (txt renamed to doc due to wordpress security)



Additional executables to be allowed for the end users redirector.exe

[HKEY_CURRENT_USERSoftwareMicrosoftInternet ExplorerLow RightsElevationPolicy{5C1359F1-E04E-4231-9E7E-955DE92A17E1}]
“AppPath”=”C:\Program Files (x86)\Citrix\ICA Client”

Citrix Not Loading Startup Items

We were running XenApp 5.0, windows 2008 SP2 and Appsense EM.
PNAgent.exe was listed as a startup item for each user in the mandatory profile.
Sometimes this would NOT start even though their profile path had not changed.

Delete the file listed below if the path to the end users appsense repository. (registry hives)
Our Appsense EM policy was set to HIVE (save) out this key to – effectively preventing explorer from launching the startup items.

Remove this registry key from the EM path

When Explorer runs, it creates a registry key called ‘StartupHasBeenRun’ under
a key named after the current session ID in[HKEY_CURRENT_USERSoftwareMicrosoftWindowsCurrentVersionExplorerSessionInfo].
When Explorer exits, it removes the key. If the key already exists when Explorer starts, then it knows that it must have previously crashed or been terminated, so it skips running the startup items.

Appsense Events not deleting

Problem: Appsense database is growing over time. The EVENTS table is huge.

Solution: (at the time of writing this article) Appsense do not have an event management / retention period. It simply records all events indefinitely. Run the following script on the database server.

—–Begin SQL script, select and copy into a text file and rename it to .sql extension; run on SQL server that holds AppSense database
— Set the following to the database that this script operates on USE [DatabaseName]
— This represents the number of days to preserve events for
— i.e. ‘7’ will delete events older than one week DECLARE @ageOfEvents INT SET @ageOfEvents = 7
— Delete the events
DECLARE @eventCount INT
SET @oldestEventTime = DATEADD (DD, -@ageOfEvents, GETUTCDATE()) PRINT N’Deleting events older than ‘ + CONVERT(NVARCHAR(32),
EXEC Event_DeleteFromTime NULL, @oldestEventTime, 0, @eventCount OUTPUT PRINT CONVERT(NVARCHAR(12), @eventCount) + N’ events deleted’
—–End SQL script