CRM 2011 deployment on Citrix

Today a collegue wanted me to create a installation package for CRM 2011 for Outlook on a Citrix farm. To manage this task I did the following;

  1. Created a TS-deployment package (that installs the software)
  2. Created a script för user customizations (on logon for each user) - targeted with GPO
Below is the scripts that I used in the environment with short explains in the REMARKS.
@echo off
REM Install CRM 2011 client
REM  Based on information in 
REM  Must be deleted so addins can be loaded using HKCU insted (per user addin load)
REM  V.1        CRM Base install + RP 8 + RP 10
REM  V.2        Fixes current directory
ECHO Starting setup
ECHO =======================
change user /install
ECHO =======================
Set INSTPATH=%~dp0
ECHO Install Base for CRM 2011 (32 bit client)
ECHO =======================
REM DisableOfflineCapability is to hide the button "Go Offline" in Outlook (due to Citrix farm)
"%INSTPATH%CRM2011-Base\Setupclient.exe" /disableofflinecapability /Q /L C:\TEMP\crm_Base_install.log 
ECHO Install RP8 for CRM 2011 (32 bit)
ECHO =======================
"%INSTPATH%CRM2011-RP8\CrmUpdateWrapper.exe" /QB /L C:\TEMP\crm_RP8_install.log
ECHO Install RP10 for CRM 2011 (32 bit)
ECHO =======================
"%INSTPATH%CRM2011-RP10\CrmUpdateWrapper.exe" /QB /L C:\TEMP\crm_RP10_install.log
ECHO Remove CRM Addins in HKLM (Excel + Outlook Addin)
ECHO =======================
reg delete HKLM\SOFTWARE\Wow6432Node\Microsoft\Office\Excel\Addins\crmexceladdin.Addin /f
reg delete HKLM\SOFTWARE\Wow6432Node\Microsoft\Office\Outlook\Addins\crmaddin.Addin /f
ECHO Logfiles
ECHO =======================
Echo Base logfile:   C:\TEMP\crm_Base_install.log
Echo RP8 Logfile:    C:\TEMP\crm_RP8_install.log
Echo RP10 Logfile:   C:\TEMP\crm_RP10_install.log
ECHO =======================
ECHO Install finished...
ECHO =======================
change user /execute
ECHO =======================
echo Pausing
Pause >nul

User customization (I haven't deployed any solution for automatic configuration of Outlook)
@echo off
REM  CRM 2011 Configuration script
REM Can precreate Outlook Profile with GOFF Outlook Profiler if wanting automatic provisioning
@echo Check Outlook Profile
reg query "HKCU\Software\Microsoft\Windows NT\CurrentVersion\Windows Messaging Subsystem\Profiles" /v DefaultProfile > NUL
if %ERRORLEVEL% EQU 0 goto CheckCRMConfigured
@echo Need Outlook Profile
Goto Exit
@echo Check CRM Configured
REM reg query HKCU\Software\Microsoft\MSCRMClient /v CoreConfigured > NUL
REM if %ERRORLEVEL% EQU 0 goto Exit
REM Configure CRM
@echo Configure CRM
REM Check if 64 or 32 bit OS and set correct path to config util
if %PROCESSOR_ARCHITECTURE% EQU x86 ( set crmconfig="C:\Program Files\Microsoft Dynamics CRM\Client\ConfigWizard\Microsoft.Crm.Application.Outlook.ConfigWizard.exe" )
if %PROCESSOR_ARCHITECTURE% NEQ x86 ( set crmconfig="C:\Program Files (x86)\Microsoft Dynamics CRM\Client\ConfigWizard\Microsoft.Crm.Application.Outlook.ConfigWizard.exe" )
%crmconfig% /Q /i "\\\sysvol\\Policies\{A05183ED-786E-43C0-9887-8173C537F941}\User\Scripts\Logon\AK-CRM2011_config.xml" /l "%temp%\crm_client_config.log"
@echo Exit
REM Internet Explorer UserData folder creation (for CRM)
REM IF folder not existing then there is an error (main.js) from CRM/Internet Explorer when nodes in CRM are used
REM Based on information on:
if not exist "%APPDATA%\Microsoft\Internet Explorer\UserData" md "%APPDATA%\Microsoft\Internet Explorer\UserData"
REM LoadBehavior=3 equals loaded addin & load on startup
reg add HKCU\SOFTWARE\Microsoft\Office\Excel\Addins\crmexceladdin.Addin /v LoadBehavior /d 3 /t REG_DWORD /f
reg add HKCU\SOFTWARE\Microsoft\Office\Outlook\Addins\crmaddin.Addin /v LoadBehavior /d 3 /t REG_DWORD /f
REM Disable CEIP
reg add HKCU\Software\Microsoft\MSCRMClient /v SQMOptInDismissed /d 1 /t REG_DWORD /f

Example of my User.xml file


No comments: