For all of the pain that the SAP GUI Front End causes us in Terminal Server environments, the installation process is actually really cool and just works. Here’s a script I’ve used to install SAP Front End to a Terminal Server. This script uses a copy of the SAP Front End install files from the CD/DVD that are deleted after the installation, so you may have issues when adding or removing components from Add or Remove Programs. It also patches the installation after setup is complete with any patch files copied to a folder named Patches inside the folder containing the copy of the SAP setup files.
For detailed information on installing SAP Front End see the SAPAdmin.exe application on the install CD and see this document from Citrix for information on tuning SAP in a Terminal Server environment:
@ECHO OFF
ECHO SAP Front End 6.4 Patch 18..
IF EXIST %SYSTEMROOT%\SYSTEM32\CHANGE.EXE CHANGE USER /INSTALL
START /WAIT SETUP\SapSetup.exe /p:"Complete GUI (local)"
IF EXIST %SYSTEMROOT%\SYSTEM32\CHANGE.EXE CHANGE USER /EXECUTEREM Update SAP with patches located in the Patches folder
FOR %%p in (%CD%\Patches\*.EXE) DO IF EXIST %SYSTEMROOT%\SYSTEM32\CHANGE.EXE CHANGE USER /INSTALL & START /WAIT setup\SAPSetup /patch:%%p /silent & IF EXIST %SYSTEMROOT%\SYSTEM32\CHANGE.EXE CHANGE USER /EXECUTE
REM Disable auto-update of the SAP application when installing from a SAP Installation Server
REG ADD HKLM\SOFTWARE\SAP\SAPSetup\SAPstart\AutoUpdate /v SapLgPad.exe /t REG_SZ /d "Off" /f
REG ADD HKLM\SOFTWARE\SAP\SAPSetup\SAPstart\AutoUpdate /v SapLogon.exe /t REG_SZ /d "Off" /f
REM Force SAP to look like a standard Windows application
REG ADD HKLM\SOFTWARE\SAP\General\Enjoy /v Active /t REG_SZ /d "Off" /f
REM Disable the splashscreen and animations
REG ADD HKLM\SOFTWARE\SAP\General\Appearance /v SplashOff /t REG_DWORD /d 0x00000001 /f
REG ADD HKLM\SOFTWARE\SAP\General\Appearance /v Animation /t REG_SZ /d "Off" /f
REM Prevent SAPgui.exe from starting SAPlogon.exe
REG ADD HKLM\SOFTWARE\SAP\SAPGUI /v StartSAPlogon /t REG_DWORD /d 0x00000000 /f
REM Set a working directory on the users home drive
REG ADD "HKLM\Software\SAP\SAP Shared" /v SAPworkdir /t REG_SZ /d "H:\sapworkdir" /f
REM Set additional information in the window title, used for SSO solutions such as Citrix Password Manager
REM REG ADD "HKCU\Software\SAP\SAPGUI Front\SAP Frontend Server\Administration" /v ShowAdditionalTitleInFo /t REG_DWORD /d 0x00000001 /f
REM Close SAPLogon when the last SAP connection is closed.
REM REG ADD HKCU\SOFTWARE\SAP\SAPLogon /v Autoclose /t REG_DWORD /d 0x00000001 /f
REM Force the SAP GUI to send print data as EMF.
REM REG ADD HKCU\Software\SAP\SAPlpd\SAPLPD /v SwinDataType /t REG_SZ /d "EMF" /f







