Installation silencieuse de Presentation Server 4.5 via script

Voici un script qui permet d’installer Java, .Net 2.0, les consoles AMC et CPS4.5 en mode silencieux vers une base datastore oracle en mode indirect (via un autre serveur Citrix). Le client de streaming et le port XML n’est pas partagé.

Les consoles installées sont celle mise à jour post HRP01.





Installation silencieuse en mode indirect


Change user /install

rem DECOMPRESSION Source Citrix

cd /d "c:configuration serveurcitrixsourcesPS45CPS45_FR_W2K3"

::Remove entries for Citrix Server in case they exist
regedit /s "c:configuration serveurcitrixPrepInstallMF.reg"
::Install JRE 1.5.09
ECHO Sun J2SE Runtime Environment 6
"c:configuration serveurcitrixsourcesPS45CPS45_FR_W2K3supportJRE1.5jre-1_5_0_09-windows-i586-p.exe" /s ADDLOCAL=jrecore IEXPLORER=1 MOZILLA=1 JAVAUPDATE=0 REBOOT=Suppress /L "%SYSTEMROOT%TEMPJRE6setup.log"
PUSHD "%ProgramFiles%Java" & FOR /D %%d IN (*) DO SET JAVAVERSION=%%d & POPD
REM Remove the "jre" text from the variable
FOR /F "tokens=2 delims=e " %%i in ("%javaversion%") DO SET JAVAVERSION=%%i
REG ADD "HKLMSOFTWAREJavaSoftJava Plug-in%JAVAVERSION%" /v HideSystemTrayIcon /t REG_DWORD /d 0×00000001 /f
REG ADD "HKLMSOFTWAREJavaSoftJava UpdatePolicy" /v EnableJavaUpdate /t REG_DWORD /d 0 /f
REG ADD "HKLMSOFTWAREJavaSoftJava UpdatePolicy" /v EnableAutoUpdateCheck /t REG_DWORD /d 0 /f
REG ADD "HKLMSOFTWAREJavaSoftJava UpdatePolicy" /v NotifyDownload /t REG_DWORD /d 0 /f
REG ADD "HKLMSOFTWAREJavaSoftJava UpdatePolicy" /v NotifyInstall /t REG_DWORD /d 0 /f
REG ADD "HKLMSOFTWAREJavaSoftJava Runtime Environment1.5.0_09" /v JavaHome /d "%JAVAVERSION%" /t REG_SZ /f
REG ADD "HKLMSOFTWAREJavaSoftJava Runtime Environment1.5.0_09" /v MicroVersion /d "2" /t REG_SZ /f
REG ADD "HKLMSOFTWAREJavaSoftJava Runtime Environment1.5.0_09" /v RuntimeLib /d "%JAVAVERSION%binclientjvm.dll" /t REG_SZ /f

::Install .Net Framework 2.0
ECHO .NET Framework 2.0
"c:configuration serveurcitrixsourcesPS45CPS45_FR_W2K3SupportDotNet20dotnetfx.exe" /Q:A /C:"INSTALL.EXE /Q"

Set CTX_ADDLOCAL_CORE=MetaFrame_XP,CTX_MF_MetaFrame_Core,CTX_MF_IMA_Core,CTX_MF_ICA_Shell_Editor,CTX_SMA,CTX_MF_CTXCPU,CTX_MF_CTXSFO
Set CTX_ADDLOCAL_PN=PN,PN_ENGINE
Set CTX_ADDLOCAL_PNAGENT=PN_AGENT
Set CTX_ADDLOCAL_CMC=CTX_MF_CMC,CTX_MF_IM_Plugin,CTX_MF_RM_Plugin
Set CTX_ADDLOCAL_IM=CTX_MF_IM,CTX_MF_IM_Service
REM Client de streaming REM Set CTX_ADDLOCAL_Streaming=CSS_CLIENT,CSS_SS
Set CTX_ADDLOCAL=%CTX_ADDLOCAL_CORE%,CTX_MF_LM,WMI,%CTX_ADDLOCAL_CMC%,%CTX_ADDLOCAL_PN%,%CTX_ADDLOCAL_PNAGENT%,%CTX_ADDLOCAL_IM%,CTX_MF_RM,CTX_MF_ASCII

SET OPTIONS=CTX_MF_FARM_SELECTION="Join"
SET OPTIONS=%OPTIONS% CTX_MF_JOIN_FARM_DB_CHOICE="Indirect"
SET OPTIONS=%OPTIONS% CTX_MF_INDIRECT_JOIN_DOMAIN_NAME="DOMAIN"
SET OPTIONS=%OPTIONS% CTX_MF_INDIRECT_JOIN_USER_NAME="CPTSVCCITRIX"
SET OPTIONS=%OPTIONS% CTX_INDIRECT_JOIN_PASSWORD="Password"
SET OPTIONS=%OPTIONS% CTX_MF_JOIN_FARM_SERVER_NAME="CITRIXDC"
SET OPTIONS=%OPTIONS% CTX_MF_JOIN_FARM_SERVER_PORT="2512"
SET OPTIONS=%OPTIONS% CTX_MF_ZONE_NAME="Ville-Production"
SET OPTIONS=%OPTIONS% CTX_MF_ADD_ANON_USERS="No"
SET OPTIONS=%OPTIONS% CTX_MF_CREATE_REMOTE_DESKTOP_USERS="CopyUsers"
SET OPTIONS=%OPTIONS% CTX_MF_SHADOWING_CHOICE="Yes"
SET OPTIONS=%OPTIONS% CTX_MF_SHADOW_PROHIBIT_REMOTE_ICA="No"
SET OPTIONS=%OPTIONS% CTX_MF_SHADOW_PROHIBIT_NO_NOTIFICATION="Yes"
SET OPTIONS=%OPTIONS% CTX_MF_SHADOW_PROHIBIT_NO_LOGGING="No"
REM SET OPTIONS=%OPTIONS% CTX_MF_XML_CHOICE="Separate"
REM SET OPTIONS=%OPTIONS% CTX_MF_XML_PORT_NUMBER="80"
REM SET OPTIONS=%OPTIONS% CTX_MF_SERVER_TYPE="E"
REM SET OPTIONS=%OPTIONS% CTX_MF_ENABLE_VIRTUAL_SCRIPTS="No"
SET OPTIONS=%OPTIONS% CTX_IMA_PROTECTION_ENABLE="0"
REM SET OPTIONS=%OPTIONS% CTX_PROTECT_KEY_TYPE="FILE"
REM SET OPTIONS=%OPTIONS% CTX_PROTECT_KEY_PATH=""
REM SET OPTIONS=%OPTIONS% CTX_PROTECT_NEW_KEY_PATH=""
REM SET OPTIONS=%OPTIONS% CTX_MF_ADD_LOCAL_ADMIN="Yes"
SET OPTIONS=%OPTIONS% CTX_RDP_DISABLE_PROMPT_FOR_PASSWORD="Yes"
SET OPTIONS=%OPTIONS% CTX_MF_LIC_CHOICE_FOR_CREATE="UseFarmSettings"
SET OPTIONS=%OPTIONS% CTX_MF_LICENSE_SERVER_NAME="SRVCITRIXLS"
SET OPTIONS=%OPTIONS% CTX_MF_LIC_CHOICE_FOR_JOIN_OR_UPGRADE="UseFarmSettings"
SET OPTIONS=%OPTIONS% CTX_MF_LICENSE_SERVER_PORT="27000"
SET OPTIONS=%OPTIONS% CTX_MF_LICENSE_SEVER_PORT_DEFAULT="1"
SET OPTIONS=%OPTIONS% CTX_IGNORE_MCM="No"
SET OPTIONS=%OPTIONS% CTX_REMOVE_WI_TURNKEY="Yes"
SET OPTIONS=%OPTIONS% CTX_MF_ONLY_LAUNCH_PUBLISHED_APPS="No"
REM SET OPTIONS=%OPTIONS% CTX_SERV_PRINTER_LOGON="ctx_cpsvcuser"
REM SET OPTIONS=%OPTIONS% CTX_SERV_MALOO_LOGON="ctx_cpuuser"
SET OPTIONS=%OPTIONS% CLIENT_NAME=%COMPUTERNAME%
SET OPTIONS=%OPTIONS% CLIENT_UPGRADE="Yes"
SET OPTIONS=%OPTIONS% CLIENT_INSTALLDIR="%ProgramFiles%CitrixICA Client"
SET OPTIONS=%OPTIONS% ENABLE_DYNAMIC_CLIENT_NAME="Yes"
SET OPTIONS=%OPTIONS% PROGRAM_FOLDER_NAME="CitrixCitrix Access Clients"
SET OPTIONS=%OPTIONS% SERVER_LOCATION="http://SRVCITRIXWI.domain.local/citrix/PNA_production/config.xml"
REM SET OPTIONS=%OPTIONS% DEFAULT_NDSCONTEXT
SET OPTIONS=%OPTIONS% ENABLE_SSON="Yes"
SET OPTIONS=%OPTIONS% CTX_ADDLOCAL=%CTX_ADDLOCAL%
REM SET OPTIONS=%OPTIONS% REINSTALLMODE=oums
SET OPTIONS=%OPTIONS% INSTALLDIR="%ProgramFiles%Citrix"
SET OPTIONS=%OPTIONS% ALLUSERS=TRUE REBOOT="ReallySuppress" /L*v "%SYSTEMROOT%TempCPS45.log" /QB-

ECHO Citrix Presentation Server 4.5..
MSIEXEC /i "c:configuration serveurcitrixsourcesPS45CPS45_FR_W2K3Citrix Presentation ServerMPS.msi" %OPTIONS%

ECHO Configuring Presentation Server..
IF "%ERRORLEVEL%"=="0" (

cd "c:Configuration serveurCitrixpatchAMC2353Setup"
IF EXIST "ASC_Framework.msi" (
ECHO Citrix Access Management Console Console..
MSIEXEC /I "ASC_Framework.msi" ALLUSERS=TRUE REBOOT=SUPRESS /QB-
MSIEXEC /I "ASC_Diagnostics.msi" ALLUSERS=TRUE REBOOT=SUPRESS /QB-
MSIEXEC /I "ASC_HotfixManagement.msi" ALLUSERS=TRUE REBOOT=SUPRESS /QB-
MSIEXEC /I "ASC_KnowledgeBase.msi" ALLUSERS=TRUE REBOOT=SUPRESS /QB-
MSIEXEC /I "ASC_Legacy.msi" ALLUSERS=TRUE REBOOT=SUPRESS /QB-
MSIEXEC /I "ASC_Licensing.msi" ALLUSERS=TRUE REBOOT=SUPRESS /QB-
MSIEXEC /I "ASC_PresentationServer.msi" ALLUSERS=TRUE REBOOT=SUPRESS /QB-
MSIEXEC /I "ASC_PSReports.msi" ALLUSERS=TRUE REBOOT=SUPRESS /QB-
MSIEXEC /I "ASC_ReportCenter.msi" ALLUSERS=TRUE REBOOT=SUPRESS /QB-
MSIEXEC /I "ASC_WebInterface.msi" ALLUSERS=TRUE REBOOT=SUPRESS /QB-
)




Sources : Jasonconger.com et le forum du support de citrix.

Installation silencieuse en mode direct vers une base oracle

change user /install


cd /d "c:configuration serveurcitrixsourcesPS45CPS45_FR_W2K3"

::Remove entries for Citrix Server in case they exist
regedit /s "c:configuration serveurcitrixPrepInstallMF.reg"
::Install JRE 1.5.09
ECHO Sun J2SE Runtime Environment 6
"c:configuration serveurcitrixsourcesPS45CPS45_FR_W2K3supportJRE1.5jre-1_5_0_09-windows-i586-p.exe" /s ADDLOCAL=jrecore IEXPLORER=1 MOZILLA=1 JAVAUPDATE=0 REBOOT=Suppress /L "%SYSTEMROOT%TEMPJRE6setup.log"
PUSHD "%ProgramFiles%Java" & FOR /D %%d IN (*) DO SET JAVAVERSION=%%d & POPD
REM Remove the "jre" text from the variable
FOR /F "tokens=2 delims=e " %%i in ("%javaversion%") DO SET JAVAVERSION=%%i
REG ADD "HKLMSOFTWAREJavaSoftJava Plug-in%JAVAVERSION%" /v HideSystemTrayIcon /t REG_DWORD /d 0×00000001 /f
REG ADD "HKLMSOFTWAREJavaSoftJava UpdatePolicy" /v EnableJavaUpdate /t REG_DWORD /d 0 /f
REG ADD "HKLMSOFTWAREJavaSoftJava UpdatePolicy" /v EnableAutoUpdateCheck /t REG_DWORD /d 0 /f
REG ADD "HKLMSOFTWAREJavaSoftJava UpdatePolicy" /v NotifyDownload /t REG_DWORD /d 0 /f
REG ADD "HKLMSOFTWAREJavaSoftJava UpdatePolicy" /v NotifyInstall /t REG_DWORD /d 0 /f
REG ADD "HKLMSOFTWAREJavaSoftJava Runtime Environment1.5.0_09" /v JavaHome /d "%JAVAVERSION%" /t REG_SZ /f
REG ADD "HKLMSOFTWAREJavaSoftJava Runtime Environment1.5.0_09" /v MicroVersion /d "2" /t REG_SZ /f
REG ADD "HKLMSOFTWAREJavaSoftJava Runtime Environment1.5.0_09" /v RuntimeLib /d "%JAVAVERSION%binclientjvm.dll" /t REG_SZ /f

::Install .Net Framework 2.0
ECHO .NET Framework 2.0
"c:configuration serveurcitrixsourcesPS45CPS45_FR_W2K3SupportDotNet20dotnetfx.exe" /Q:A /C:"INSTALL.EXE /Q"

SET CTX_ADDLOCAL_CORE=MetaFrame_XP,CTX_MF_MetaFrame_Core,CTX_MF_IMA_Core,CTX_MF_ICA_Shell_Editor,CTX_SMA,CTX_MF_CTXCPU,CTX_MF_CTXSFO
SET CTX_ADDLOCAL_PN=PN,PN_ENGINE
SET CTX_ADDLOCAL_PNAGENT=PN_AGENT
SET CTX_ADDLOCAL_CMC=CTX_MF_CMC,CTX_MF_IM_Plugin,CTX_MF_RM_Plugin
SET CTX_ADDLOCAL_IM=CTX_MF_IM,CTX_MF_IM_Service
::Set CTX_ADDLOCAL_Streaming=CSS_CLIENT,CSS_SS
Set CTX_ADDLOCAL=%CTX_ADDLOCAL_CORE%,CTX_MF_LM,WMI,%CTX_ADDLOCAL_CMC%,%CTX_ADDLOCAL_PN%,%CTX_ADDLOCAL_PNAGENT%,%CTX_ADDLOCAL_IM%,CTX_MF_RM,CTX_MF_ASCII

SET OPTIONS=CTX_MF_FARM_SELECTION="Join"
SET OPTIONS=%OPTIONS% CTX_MF_JOIN_FARM_DB_CHOICE="Direct"
SET OPTIONS=%OPTIONS% CTX_MF_ODBC_USER_NAME="CITRIXDS"
SET OPTIONS=%OPTIONS% CTX_MF_ODBC_PASSWORD="Password"
SET OPTIONS=%OPTIONS% CTX_MF_ODBC_RE_ENTERED_PASSWORD="Password"
SET OPTIONS=%OPTIONS% CTX_MF_SILENT_DSNFILE="MF20.DSN"
SET OPTIONS=%OPTIONS% CTX_MF_ZONE_NAME="Ville-Production"
SET OPTIONS=%OPTIONS% CTX_MF_ADD_ANON_USERS="No"
SET OPTIONS=%OPTIONS% CTX_MF_CREATE_REMOTE_DESKTOP_USERS="CopyUsers"
SET OPTIONS=%OPTIONS% CTX_MF_SHADOWING_CHOICE="Yes"
SET OPTIONS=%OPTIONS% CTX_MF_SHADOW_PROHIBIT_REMOTE_ICA="No"
SET OPTIONS=%OPTIONS% CTX_MF_SHADOW_PROHIBIT_NO_NOTIFICATION="Yes"
SET OPTIONS=%OPTIONS% CTX_MF_SHADOW_PROHIBIT_NO_LOGGING="No"
REM SET OPTIONS=%OPTIONS% CTX_MF_XML_CHOICE="Separate"
REM SET OPTIONS=%OPTIONS% CTX_MF_XML_PORT_NUMBER="80"
REM SET OPTIONS=%OPTIONS% CTX_MF_SERVER_TYPE="E"
REM SET OPTIONS=%OPTIONS% CTX_MF_ENABLE_VIRTUAL_SCRIPTS="No"
SET OPTIONS=%OPTIONS% CTX_IMA_PROTECTION_ENABLE="0"
REM SET OPTIONS=%OPTIONS% CTX_PROTECT_KEY_TYPE="FILE"
REM SET OPTIONS=%OPTIONS% CTX_PROTECT_KEY_PATH=""
REM SET OPTIONS=%OPTIONS% CTX_PROTECT_NEW_KEY_PATH=""
REM SET OPTIONS=%OPTIONS% CTX_MF_ADD_LOCAL_ADMIN="Yes"
SET OPTIONS=%OPTIONS% CTX_RDP_DISABLE_PROMPT_FOR_PASSWORD="Yes"
SET OPTIONS=%OPTIONS% CTX_MF_LIC_CHOICE_FOR_CREATE="UseFarmSettings"
SET OPTIONS=%OPTIONS% CTX_MF_LICENSE_SERVER_NAME="SRVCITRIXLIC"
SET OPTIONS=%OPTIONS% CTX_MF_LIC_CHOICE_FOR_JOIN_OR_UPGRADE="UseFarmSettings"
SET OPTIONS=%OPTIONS% CTX_MF_LICENSE_SERVER_PORT="27000"
SET OPTIONS=%OPTIONS% CTX_MF_LICENSE_SEVER_PORT_DEFAULT="1"
SET OPTIONS=%OPTIONS% CTX_IGNORE_MCM="No"
SET OPTIONS=%OPTIONS% CTX_REMOVE_WI_TURNKEY="Yes"
SET OPTIONS=%OPTIONS% CTX_MF_ONLY_LAUNCH_PUBLISHED_APPS="No"
REM SET OPTIONS=%OPTIONS% CTX_SERV_PRINTER_LOGON="ctx_cpsvcuser"
REM SET OPTIONS=%OPTIONS% CTX_SERV_MALOO_LOGON="ctx_cpuuser"
SET OPTIONS=%OPTIONS% CLIENT_NAME=%COMPUTERNAME%
SET OPTIONS=%OPTIONS% CLIENT_UPGRADE="Yes"
SET OPTIONS=%OPTIONS% CLIENT_INSTALLDIR="%ProgramFiles%CitrixICA Client"
SET OPTIONS=%OPTIONS% ENABLE_DYNAMIC_CLIENT_NAME="Yes"
SET OPTIONS=%OPTIONS% PROGRAM_FOLDER_NAME="CitrixCitrix Access Clients"
SET OPTIONS=%OPTIONS% SERVER_LOCATION="http://SRVCITRIXWI.domain.local/citrix/PNA_production/config.xml"
REM SET OPTIONS=%OPTIONS% DEFAULT_NDSCONTEXT
SET OPTIONS=%OPTIONS% ENABLE_SSON="Yes"
SET OPTIONS=%OPTIONS% CTX_ADDLOCAL=%CTX_ADDLOCAL%
REM SET OPTIONS=%OPTIONS% REINSTALLMODE=oums
SET OPTIONS=%OPTIONS% INSTALLDIR="%ProgramFiles%Citrix"
SET OPTIONS=%OPTIONS% ALLUSERS=TRUE REBOOT="ReallySuppress" /L*v "%SYSTEMROOT%TempCPS45.log" /QB-

ECHO Citrix Presentation Server 4.5..
MSIEXEC /i "c:configuration serveurcitrixsourcesPS45CPS45_FR_W2K3Citrix Presentation ServerMPS.msi" %OPTIONS%

ECHO Configuring Presentation Server..
IF "%ERRORLEVEL%"=="0" (

cd "c:Configuration serveurCitrixpatchAMC2353Setup"
IF EXIST "ASC_Framework.msi" (
ECHO Citrix Access Management Console Console..
MSIEXEC /I "ASC_Framework.msi" ALLUSERS=TRUE REBOOT=SUPRESS /QB-
MSIEXEC /I "ASC_Diagnostics.msi" ALLUSERS=TRUE REBOOT=SUPRESS /QB-
MSIEXEC /I "ASC_HotfixManagement.msi" ALLUSERS=TRUE REBOOT=SUPRESS /QB-
MSIEXEC /I "ASC_KnowledgeBase.msi" ALLUSERS=TRUE REBOOT=SUPRESS /QB-
MSIEXEC /I "ASC_Legacy.msi" ALLUSERS=TRUE REBOOT=SUPRESS /QB-
MSIEXEC /I "ASC_Licensing.msi" ALLUSERS=TRUE REBOOT=SUPRESS /QB-
MSIEXEC /I "ASC_PresentationServer.msi" ALLUSERS=TRUE REBOOT=SUPRESS /QB-
MSIEXEC /I "ASC_PSReports.msi" ALLUSERS=TRUE REBOOT=SUPRESS /QB-
MSIEXEC /I "ASC_ReportCenter.msi" ALLUSERS=TRUE REBOOT=SUPRESS /QB-
MSIEXEC /I "ASC_WebInterface.msi" ALLUSERS=TRUE REBOOT=SUPRESS /QB-
)



Plus d'infos dans le guide d'administration de CPS 4.5 : Annexe D page 423
http://support.citrix.com/servlet/KbServlet/download/12588-102-16684/Administrators_Guide.pdf