Deployment Script for Citrix Profile Management 2.x

by Jeremy Saunders on November 29, 2009

Here is my deployment script for Citrix Profile Management 2.x, formerly known as User Profile Manager.

Enjoy!

InstCPM.cmd


@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
Jeremy Saunders

Jeremy Saunders

Independent Consultant | Contractor | Microsoft & Citrix Specialist | Desktop Virtualization Specialist at J House Consulting
Jeremy is a highly respected, IT Professional, with over 30 years’ experience in the industry. He is an independent IT consultant providing expertise to enterprise, corporate, higher education and government clients. His skill set, high ethical standards, integrity, morals and attention to detail, coupled with his friendly nature and exceptional design and problem solving skills, makes him one of the most highly respected and sought after Microsoft and Citrix technical resources in Australia. His alignment with industry and vendor best practices puts him amongst the leaders of his field.
Jeremy Saunders
Jeremy Saunders
Jeremy Saunders

Previous post:

Next post: