You are currently browsing the tag archive for the ‘msiexec’ tag.
It’s widely documented in many different areas that there a plethora of ways to optimize your server for running your beloved Presentation Server. I’ll show you here the ones I like to use.
Firstly though, lets put Roll Up 03 on to the server. This roll up is very much recommended as it stabilizes the product installation considerably.
At this point, I don’t add any subsequent patches – I use Installation Manager for that…much easier. I want R03 to be the baseline, so with that in mind we install it like this :-
START /WAIT “R03″ msiexec.exe /update PSE450W2K3R03.msp /passive /norestart
An easy one you will no doubt be thinking! Only easy if you know though!
UPHClean
This is a utility that…you know what, check it out yourself at http://blogs.technet.com/uphclean/default.aspx
If you haven’t used it before…use it now…it really help with user logoff times and reduces some profile issues.
START /WAIT msiexec /i “uphclean-setup.msi” TARGETDIR=”D:\Program Files\UPHClean” /l*v “C:\Setup\Log\uphclog.log” /q
There is a tweak for UPHClean in v2.x that allows it to act on problems caused by application holding onto files after logoff…virus checker anyone! So it’s recommended to switch this on too.
REG ADD “HKLM\SYSTEM\CurrentControlSet\Services\UPHClean\Parameters” /v SHARING_VIOLATION_REMAP /t REG_DWORD /d 1 /f > nul
Print Spooler
As a rule I always move the print spooler to any common partition other than C: so as not to unsuspectingly fill the C: drive with those occasional rogue print files.
I generally create a TEMP folder on the D: drive (if one does not exist), then create a SPOOLER folder within it. At the same time, it is worthwhile changing the system environment variables to re-point TEMP and TMP to D:\Temp, keeping more crap of your system partition – that reg key is listed at the bottom.
A registry hack is needed for this. Get into regedit, use REG or a .reg file to change the spooler location:
[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Print\Printers]
User Profiles Folders
By default, unless you are doing some fancy schmancy Folder Redirection (which I may get to later) the default profile folder is set to C:\Documents & Settings. Argh…C: drive bloatage potential once again.
It is, again, in my mind, worthwhile changing the location of the folder so that any Locally cached profiles don’t get caught in the folder and start to fill up the C: drive. Changing the folder location is relatively simple in the registry but you *must* also copy the contents of All Users and Default User into your new folder, so that the logon process can complete as expected.
Here’s the all-in-one solution for this:
ECHO Creating Local Profiles Alternative Locations..
md “e:\Local Profiles”
md “e:\Local Profiles\All Users”
md “e:\Local Profiles\Default User”
ECHO Populating “All Users” and “Default User” Folders..
xcopy “C:\Documents and Settings\All Users\*.*” “e:\Local Profiles\All Users\*.*” /s /e /y /q /h > nul
xcopy “C:\Documents and Settings\Default User\*.*” “e:\Local Profiles\Default User\*.*” /s /e /y /q /h > nul
ECHO Redirecting “All Users” and “Default User” Profiles to E:\Local Profiles..
REG ADD “HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\ProfileList” /v ProfilesDirectory /t REG_EXPAND_SZ /d “E:\Local Profiles” /F > nul
You may not like E:\Local Profiles, fine, just change it where you see it!
Tweaks
As for the rest of the tweaks, I’m not going to go into detail with them right now, but here you go. I’m pretty sure Madden has them all listed on his pages and most of them will be in Doug’s Methodology In A Box document which is tight (although I don’t use everything posted there)!
Here’s the dump of the reg file I load up. I’m actually thinking of just adding this to an MST to accompany the XenApp installation but we’ll see.
Windows Registry Editor Version 5.00
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Run]
“CPQTEAM”=-
“vptray”=-
“IcaBar”=-
[HKEY_CLASSES_ROOT\regfile\shell]
@=”edit”
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Internet Settings\5.0\Cache\Content]
“PerUserItem”=dword:00000001
“CacheLimit”=dword:00002500
“CachePath”=”%userprofile%\\local settings\\temporary internet files”
“CachePrefix”=”"
[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\LanmanServer\Parameters]
“IRPStackSize”=dword:0000000f
[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\lanmanworkstation\parameters]
“UtilizeNTCaching”=dword:00000000
[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session Manager\Memory Management]
“DisablePagingExecutive”=dword:00000001
[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Tcpip\Parameters]
“TcpMaxDataRetransmissions”=dword:0000000a
“KeepAliveTime”=dword:006ddd00
“KeepAliveInterval”=dword:000003e8
[HKEY_LOCAL_MACHINE\Software\Microsoft\ WindowsNT\CurrentVersion\Winlogon]
“AllocateFloppies”=”1″
“AllocateCDRoms”=”1″
[HKEY_CURRENT_USER\Software\Microsoft\Windows NT\CurrentVersion\Network\Persistent Connections]
“SaveConnections”=”no”
[HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer]
“NoRecentDocsNetHood”=dword:00000001
[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\lanmanserver\parameters]
“MaxWorkItems”=dword:00002004
“MaxMpxCt”=dword:00000800
“MaxRawWorkItems”=dword:00000200
“MaxFreeConnections”=dword:00000064
“MinFreeConnections”=dword:00000020
[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\lanmanworkstation\parameters]
“MaxCmds”=dword:00000800
[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session Manager\Configuration Manager]
“RegistryLazyFlushInterval”=dword:0000003c
[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Print\Printers]
“DefaultSpoolDirectory”=”D:\\TEMP\\SPOOLER”
[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Print\Providers]
“NetPopup”=dword:00000000
[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Spooler]
“ErrorControl”=dword:00000002
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\policies\Explorer]
“NoAddPrinter”=dword:00000001
“NoDeletePrinter”=dword:00000001
“NoSMBalloonTip”=dword:00000001
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\policies\system]
“dontdisplaylastusername”=dword:00000001
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon]
“DeleteRoamingCache”=dword:00000001
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\AeDebug]
“Debugger”=”"
[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\FileSystem]
“NtfsDisableLastAccessUpdate”=dword:00000001
[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Print]
“BeepEnabled”=dword:00000000
[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Print\Providers]
“NetPopup”=dword:00000000
[HKEY_USERS\.DEFAULT\Software\Microsoft\Internet Explorer\Main]
“ForceOffscreenComposition”=dword:00000001
[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session Manager\Environment]
“TEMP”=”D:\\TEMP”
“TMP”=”D:\\TEMP”
“PROFILEPATH”=”E:\\Local Profiles”
[HKEY_LOCAL_MACHINE\SOFTWARE\ORACLE\KEY_orahome10201\OO4O]
“TempFileDirectory”=”D:\\TEMP\\ORATEMP”
[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Windows]
“ErrorMode”=dword:00000002
[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session Manager\SubSystems]
“Posix”=-
[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Terminal Server\WinStations\ICA-tcp]
“fInheritShadow”=dword:00000000
“fInheritMaxSessionTime”=dword:00000000
“fInheritMaxDisconnectionTime”=dword:00000000
“fInheritMaxIdleTime”=dword:00000000
“fInheritAutoClient”=dword:00000000
“fDisableExe”=dword:00000000
“fDisableCam”=dword:00000001
“fDisableCcm”=dword:00000001
“MaxDisconnectionTime”=dword:000927c0
“MaxIdleTime”=dword:02255100
[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Terminal Server\WinStations\ICA-tcp\UserOverride\Control Panel\Desktop\WindowMetrics]
“MinAnimate”=”0″
[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Terminal Server\WinStations\ICA-tcp\AutoClientPrinters]
“Flags”=dword:00000000
[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Terminal Server\WinStations\ICA-tcp\UserOverride\Control Panel\Colors]
“Background”=”0 0 0″
[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Terminal Server\WinStations\ICA-tcp\UserOverride\Control Panel\Desktop]
“AutoEndTasks”=”1″
“CursorBlinkRate”=”-1″
“DragFullWindows”=”0″
“MenuShowDelay”=”10″
“WaitToKillAppTimeout”=”5000″
“SmoothScroll”=dword:00000000
“Wallpaper”=”(None)”
“AutoEndTasks”=”1″
[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Terminal Server\WinStations\RDP-Tcp]
“fInheritShadow”=dword:00000000
“fAutoClientDrives”=dword:00000000
“fDisableCdm”=dword:00000001
“Shadow”=dword:00000000
[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Terminal Server\WinStations\RDP-Tcp\UserOverride\Control Panel\Desktop]
“Wallpaper”=”(None)”
[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Citrix]
“AnnoyAdminsOnly”=dword:00000001
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Active Setup\Installed Components\{44BBA840-CC51-11CF-AAFA-00AA00B6015C}]
@=”Microsoft Outlook Express 6″
“StubPath”=
[HKEY_LOCAL_MACHINE\SOFTWARE\Citrix\Print]
“DefaultPrnFlags”=dword:00004000
[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\UPHClean\Parameters]
“REPORT_ONLY”=dword:00000001
[HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\CDRom]
“Autorun”=dword:00000001
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer]
“Max Cached Icons”=”4096″
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\policies\Explorer]
“LinkResolveIgnoreLinkInfo”=dword:00000001
[HKEY_CURRENT_USER\Control Panel\Desktop]
“MinMaxClose”=”0″
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer]
“AlwaysUnloadDLL”=”1″
[HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced]
“EnableBalloonTips”=dword:00000000
[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Citrix\wfshell\TWI]
“DllName”=”seamls20.dll”
“NotifyEvent”=”WfshellTwiNotify”
“LogoffCheckSysModules”=”ssoshell.exe,ssobho.exe,ssomho.exe,acrodist.exe,acrotray.exe”
[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Citrix\ClientPrinterProperties]
“fPurgeAnyWay”=dword:00000001
“fNotInheritKeepPrintedJobs”=dword:00000001
That’s pretty much it (for now) on the 32-bit build. I will go over to the 64-bit build asap, there are some slight differences in the routines, but not too many…PL
But I jest, it rocks!
Before you can run the unattended installation, you need to make a File DSN to point your installation to the database. As I am using SQL, I will show you the make up of the file. Some lines aren’t required from that which the ODBC creates for you.
[ODBC]
DRIVER=SQL Server
UID=USERNAME
Trusted_Connection=Yes
Network=DBMSSOCN
DATABASE=NAME_OF_DATABASE
APP=Citrix IMA
SERVER=DB_SERVER_NAME
Description=Citrix Xenapp Design Development
SET OPTIONS=ALLUSERS=TRUE REBOOT=ReallySuppress /l*v “c:\setup\log\xenapp.log” /QB
SET OPTIONS=%OPTIONS% INSTALLDIR=”D:\Program Files\Citrix”
SET OPTIONS=%OPTIONS% CTX_MF_FARM_SELECTION=Join
SET OPTIONS=%OPTIONS% CTX_MF_JOIN_FARM_DB_CHOICE=Direct
SET OPTIONS=%OPTIONS% CTX_MF_ZONE_NAME=”UK Xenapp Dev Farm”
SET OPTIONS=%OPTIONS% CTX_MF_SILENT_DSNFILE=MF20.DSN
SET OPTIONS=%OPTIONS% CTX_MF_ODBC_USER_NAME=DOMAIN\USER
SET OPTIONS=%OPTIONS% CTX_MF_ODBC_PASSWORD=xxxxxxxx
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=No
SET OPTIONS=%OPTIONS% CTX_MF_SHADOW_PROHIBIT_NO_LOGGING=No
SET OPTIONS=%OPTIONS% CTX_MF_XML_CHOICE=Separate
SET OPTIONS=%OPTIONS% CTX_MF_LAUNCH_CLIENT_CD_WIZARD=No
SET OPTIONS=%OPTIONS% CTX_MF_SERVER_TYPE=E
SET OPTIONS=%OPTIONS% CTX_MF_REBOOT=No
SET OPTIONS=%OPTIONS% CTX_IGNORE_MCM=No
SET OPTIONS=%OPTIONS% CTX_REMOVE_WI_TURNKEY=No
SET OPTIONS=%OPTIONS% CTX_MF_ENABLE_VIRTUAL_SCRIPTS=Yes
SET OPTIONS=%OPTIONS% CTX_MF_LICENSE_SERVER_NAME=SERVERNAME
SET OPTIONS=%OPTIONS% CTX_MF_LICENSE_SERVER_PORT=27000
SET OPTIONS=%OPTIONS% CTX_MF_LICENSE_SERVER_PORT_DEFAULT=1
SET OPTIONS=%OPTIONS% CTX_MF_LIC_CHOICE_FOR_CREATE=UseFarmSettings
SET OPTIONS=%OPTIONS% CTX_MF_LIC_CHOICE_FOR_JOIN_OR_UPGRADE=UseFarmSettings
SET OPTIONS=%OPTIONS% CTX_RDP_DISABLE_PROMPT_FOR_PASSWORD=Yes
SET OPTIONS=%OPTIONS% CTX_MF_ONLY_LAUNCH_PUBLISHED_APPS=Yes
SET OPTIONS=%OPTIONS% CTX_ADDLOCAL=CTX_MF_MetaFrame_Core,CTX_MF_IM,CTX_MF_IM_Service,CTX_MF_LM,CTX_MF_NM,CTX_MF_RM,PN_ENGINE,PN,
WMI,MetaFrame_XP,CTX_MF_CMC,CTX_MF_ICA_Shell_Editor,CTX_MF_IMA_Core,CTX_MF_IM_Plugin,CTX_MF_RM_Plugin,CTX_SMA,
CTX_MF_CTXCPU,CTX_MF_CTXSFO,CTX_MF_ASCII
This line must have no spaces in it (or line breaks). Each component is comma separated, but again no spaces, otherwise it doesn’t work. As previously mentioned, I didn’t want the PN Agent or the IM Packager deploying and this does everything but those!
I decided to install all the components I required on each server. This will make it easier to publish for remote support and to load balance where necessary.
ECHO Diagnostics..
START /WAIT %systemroot%\system32\MSIEXEC /I “ASC_Diagnostics.msi” INSTALLDIR=”D:\Program Files\Citrix” ALLUSERS=TRUE REBOOT=SUPRESS /QB-
ECHO Hotfix Management..
START /WAIT %systemroot%\system32\MSIEXEC /I “ASC_HotfixManagement.msi” INSTALLDIR=”D:\Program Files\Citrix” ALLUSERS=TRUE REBOOT=SUPRESS /QB-
ECHO Knowledgebase..
START /WAIT %systemroot%\system32\MSIEXEC /I “ASC_KnowledgeBase.msi” INSTALLDIR=”D:\Program Files\Citrix” ALLUSERS=TRUE REBOOT=SUPRESS /QB-
ECHO Legacy..
START /WAIT %systemroot%\system32\MSIEXEC /I “ASC_Legacy.msi” INSTALLDIR=”D:\Program Files\Citrix” ALLUSERS=TRUE REBOOT=SUPRESS /QB-
ECHO Licensing..
START /WAIT %systemroot%\system32\MSIEXEC /I “ASC_Licensing.msi” INSTALLDIR=”D:\Program Files\Citrix” ALLUSERS=TRUE REBOOT=SUPRESS /QB-
ECHO Presentation Server..
START /WAIT %systemroot%\system32\MSIEXEC /I “ASC_PresentationServer.msi” INSTALLDIR=”D:\Program Files\Citrix” ALLUSERS=TRUE REBOOT=SUPRESS /QB-
ECHO PS Reports..
START /WAIT %systemroot%\system32\MSIEXEC /I “ASC_PSReports.msi” INSTALLDIR=”D:\Program Files\Citrix” ALLUSERS=TRUE REBOOT=SUPRESS /QB-
ECHO (and finally..) Report Centre..
START /WAIT %systemroot%\system32\MSIEXEC /I “ASC_ReportCenter.msi” INSTALLDIR=”D:\Program Files\Citrix” ALLUSERS=TRUE REBOOT=SUPRESS /QB-
NOTE: the AMC does not respond to INSTALLDIR= and automatically installs your files in C:\Program Files\Common Files\Citrix
To someone like me who always uses the D: partition for infrastructure software installations, it’s a kick in the nuts! I’m almost OCD about that and as yet I haven’t found a way to change it. Incidentally I haven’t found the reason why it *needs* to be on C: – I will persevere…oh, perhaps it’s time to stop being lazy and delve into the logs like in the good old days!
So, by now you should have a perfectly installed XenApp Server. Of course this will need some tweaking for your environment, I will show you the tweaks I make in the next entry.
Based on Windows 2003 R2 Standard
Time to admit something to you…part of my job is made easy as there is a team dedicated to prep’ing the base build and creating OS patch payloads for security compliance, so I don’t have to concern myself with automating the base OS – I just have to fill in the gaps for XenApp to install without barfing!
Pre-requisites
there are seemingly so many pre-requisites for this build it is mind boggling. From experience, some non-virtualised application suites have their own common requirements, so we believe we should be able simplify things by providing what XenApp needs as well as what we’ve seen some of our more complicated application requirements to make hosting applications somewhat easier.
- .Net Framework 2.0
- .Net Framework 3.0
- .Net Framework 3.5
- JRE 1.5.09
- J# 2.0
- Visual C++ runtime (needed for post roll-up 03 patches!)
All these will be installed via command line scripts in unattended and silent mode, examples of working installation syntax will follow below.
This will save you oodles of time, I assure you. Some of the install commands are pretty easy but others can be a pain in the rear. I admit to getting some guidance from some pretty good resources on the web but to get them right for my own environment sometimes takes a little extra cunning!
Every one of these components need to be installed before putting XenApp 5.0 on the W2K3 server but before we install these, we need to put the server in Terminal Server Application mode.
sysocmgr.exe /i:%systemroot%\inf\sysoc.inf /u:”%INSTALLDIR%\CONFIG\TermServ.inf” /r /x /q
.Net Framework 3.0
.Net Framework 3.5
START /WAIT “dotnet35″ dotNetFx35.exe /Q /PASSIVE /NORESTART
Java JRE 1.5.09
START /WAIT “java” jre-1_5_0_09-windows-i586-p.exe /s /v”ALLUSERS=TRUE REBOOT=REALLYSUPPRESS INSTALLDIR=D:\Progra~1\Java\j2re1.5.0_09 ADDLOCAL=jrecore IEXPLORER=1 MOZILLA=0 JAVAUPDATE=0 /QB-” /QB /l c:\setup\log\jre15.log
In addition to the JRE installation, a few things need to be tidied up, general stuff to delete shortcuts and disable the auto update. I recommend using them as-is.
REG ADD “HKLM\SOFTWARE\JavaSoft\Java Plug-in\%JAVAVERSION%” /v HideSystemTrayIcon /t REG_DWORD /d 0×00000001 /f > nul
REG ADD “HKLM\SOFTWARE\JavaSoft\Java Update\Policy” /v EnableJavaUpdate /t REG_DWORD /d 0 /f > nul
REG ADD “HKLM\SOFTWARE\JavaSoft\Java Update\Policy” /v EnableAutoUpdateCheck /t REG_DWORD /d 0 /f > nul
REG ADD “HKLM\SOFTWARE\JavaSoft\Java Update\Policy” /v NotifyDownload /t REG_DWORD /d 0 /f > nul
REG ADD “HKLM\SOFTWARE\JavaSoft\Java Update\Policy” /v NotifyInstall /t REG_DWORD /d 0 /f > nul
REG DELETE “HKLM\SOFTWARE\JavaSoft\Java Update\Policy” /v PromptAutoUpdateCheck /f > nul
IF EXIST “%ALLUSERSPROFILE%\Desktop\Java Web Start.LNK” DEL “%ALLUSERSPROFILE%\Desktop\Java Web Start.LNK” > nul
IF EXIST “%ALLUSERSPROFILE%\Start Menu\Programs\Java Web Start\Java Web Start.LNK” RD /Q /S “%ALLUSERSPROFILE%\Start Menu\Programs\Java Web Start” > nul
VisualC++ Runtime
START /WAIT “C++” vcredist_x86.exe /q:a /c:”VCREDI~3.EXE /q:a /c:”"msiexec /i vcredist.msi /qn”" “
You will need to reboot your server at this juncture to ensure the SYSOCMGR change you made for Terminal Services Application Mode is registered. XenApp will not install unless you do…
So what are you waiting for, reboot!
