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!


@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

Technical Architect | DevOps Evangelist | Software Developer | Microsoft, NVIDIA, Citrix and Desktop Virtualisation (VDI) Specialist/Expert | Rapper | Improvisor | Comedian | Property Investor | Kayaking enthusiast at J House Consulting
Jeremy Saunders is the Problem Terminator. He is a highly respected IT Professional with over 35 years’ experience in the industry. Using his exceptional design and problem solving skills with precise methodologies applied at both technical and business levels he is always focused on achieving the best business outcomes. He worked as an independent consultant until September 2017, when he took up a full time role at BHP, one of the largest and most innovative global mining companies. With a diverse skill set, high ethical standards, and attention to detail, coupled with a friendly nature and great sense of humour, Jeremy aligns to industry and vendor best practices, which puts him amongst the leaders of his field. He is intensely passionate about solving technology problems for his organisation, their customers and the tech community, to improve the user experience, reliability and operational support. Views and IP shared on this site belong to Jeremy.
Jeremy Saunders
Jeremy Saunders

Previous post:

Next post: