Deploy SAPGUI for windows using SCCM
To create the SAPGUI package using SCCM and deploy it to your required collection, refer to steps below:
The installer package provided by SAP on SAP Marketplace includes multiple tools like SAPGUI, SAP PDF Print, Business Explorer, SAP Interactive Excel, SAP Business Client etc.
Depending on the requirement we install the required packages along with the SAPGUI package.
NOTE – In this post, i am installing the 32bit version.
The downloaded package includes both 64 bit and 32 bit installer binaries.
\\50160634_2\SAP_GUI_for_Windows_8.00_Comp.1\PRES1\GUI\Windows
# For 32 bit use the path -
\\50160634_2\SAP_GUI_for_Windows_8.00_Comp._1_\PRES1\GUI\Windows\Win32\Setup
# For 64 bit use the path -
\\50160634_2\SAP_GUI_for_Windows_8.00_Comp._1_\PRES1\GUI\Windows\Win64\Setup




In Install.PS1, I am only installing the SAPGUI component, so I am only passing a single argument in product parameter. If you need to deploy multiple components, just specify them using + as separator e.g. Product=”SAPGUI+SAPBI”.
$currentDirectory = Get-Location
write-output($currentDirectory)
$SapSetPath = Join-Path $currentDirectory "\SAP_Package\Setup"
Write-Output ($SapSetPath)
$ExePath = Get-ChildItem -Path "$SapSetPath" -Include NwSapSetup.exe -File -Recurse -ErrorAction SilentlyContinue
If($ExePath.Exists)
{
Write-Output "Found $($ExePath.FullName), now attempting to install $installTitle."
Write-Output "Installing SAPGUI. This may take some time. Please wait..."
$arguments = @("/Product=SAPGUI","/silent","/force")
Start-Process -FilePath $ExePath -ArgumentList $arguments -Wait -PassThru | Out-Null
}
Note – For uninstall and repair use the parameter /uninstall and /repair.