Here is my deployment script for Citrix Profile Management 2.x, formerly known as User Profile Manager.
Enjoy!
@Echo Off
Echo Citrix XenApp Deployment
Echo ————————
Echo.
Echo Revision History:
Echo.
Echo v1.0 07/09/09 Jeremy@jhouseconsulting.com
Echo Updated for Citrix Profile Management 2.0.1
Echo.
Echo ….Installing Citrix Profile Management 2.x…..
Echo.
Echo.
SetLocal
Set CPMVersion=2.0.1
Set CPMInstaller=profilemgr2_x86.msi
IF /I “%PROCESSOR_ARCHITECTURE%”==”AMD64” Set CPMInstaller=profilemgr2_x64.msi
Set loglocation=%systemDrive%\bldlogs
if not exist %loglocation% md %loglocation%
IF EXIST %SYSTEMROOT%\SYSTEM32\CHANGE.EXE CHANGE USER /INSTALL
:: Installing CPM…
start “Installing…” /wait msiexec /i “%~dp0%CPMVersion%\%CPMInstaller%” /qb /Lv* “%loglocation%\CPM%CPMVersion%.log” REBOOT=ReallySuppress
IF EXIST %SYSTEMROOT%\SYSTEM32\CHANGE.EXE CHANGE USER /EXECUTE
:: Enable Citrix Profile Management by setting the following registry value. This can be done by
:: using the supplied Administrative Template in a Group Policy Object (GPO).
:: Key: HKLM\Software\Policies\Citrix\UserProfileManager
:: Value: ServiceActive
:: Type: REG_DWORD
:: Data: 1
:: We rename the ini files as a precautionary measure. This is because the ini file contains the
:: default entries for all settings that are configurable via group policy. The issue here is
:: that once the Citrix User Profile Manager service has been enabled, if the corresponding group
:: policy setting is set to “not configured”, it will use the default setting in the ini file.
:: This can be dangerous! Hence the reason why we rename it by default.
If EXIST “%PROGRAMFILES%\Citrix\User Profile Manager\UPMPolicyDefaults_V1Profile_en.ini” (
REN “%PROGRAMFILES%\Citrix\User Profile Manager\UPMPolicyDefaults_V1Profile_en.ini” “UPMPolicyDefaults_V1Profile_en.ini.old”
)
If EXIST “%PROGRAMFILES%\Citrix\User Profile Manager\UPMPolicyDefaults_V2Profile_all.ini” (
REN “%PROGRAMFILES%\Citrix\User Profile Manager\UPMPolicyDefaults_V2Profile_all.ini” “UPMPolicyDefaults_V2Profile_all.ini.old”
)
EndLocal
Exit /b 0