Mar 27 2023 07:55 PM
Hi,
I'm doing an Intune packaging where I have below PowerShell Script when installing MSI and MSP together, however, it installs only msi wondering if something is wrong why MSP is not installing.
$InstallDir = "C:\Program Files\"
$shortcuts = "1"
$reference = "TRIM"
#We can automate and control based on installed features on the pc
$word = "1"
$excel = "1"
$powerpoint = "1"
$outlook = "1"
$project = "0"
$date = ((get-date).ToUniversalTime()).ToString("yyyyMMddThhmmssZ")
$logPath = "C:\TEMP"
$CMlog = $logPath+"\CM_Install_$date.log"
$patchlog = $logPath+"\CM_Patch_Install_$date.log"
New-Item -ItemType Directory -Force -Path $logPath | Out-Null
$cmArg = '/i "'+"$PSScriptRoot"+'\'+'CM_Client_x64.msi" /qn /norestart /l*v "'+"$CMlog"+'" INSTALLDIR="'+"$InstallDir"+'" TRIM_DSK="'+"$shortcuts"+'" TRIMREF="'+"$reference"+'" WORD_ON="'+"$word"+'" EXCEL_ON="'+"$excel"+'" POWERPOINT_ON="'+"$powerpoint"+'" OUTLOOK_ON="'+"$outlook"+'" PROJECT_ON="'+"$project"+'"'
Start-Process "msiexec.exe" -Wait -ArgumentList $cmArg
$patchArg = '/i "'+"$PSScriptRoot"+'\'+'CM_Patch1.msp" /qn /norestart /l*v "'+"$Patch1log"+'"'
Start-Process $file -Wait -ArgumentList $patchArg
$patchArg = '/i "'+"$PSScriptRoot"+'\'+'CM_Patch1H41.msp" /qn /norestart /l*v "'+"$Hotfixlog"+'"'
Start-Process $file -Wait -ArgumentList $patchArg
Mar 28 2023 03:01 AM
Mar 28 2023 12:50 PM
Apr 01 2023 04:23 PM
You cannot install an MSI and an MSP together. When installing an MSI, only a transform (MST) can be used as part of the installation.
An MSP is designed to be run separately after the installation, or against the administrative installation - if one is being used (which is a special type of installation beyond the scope of the question you've asked.)
If you provide the parameters for an MSI installation as well as a patch (/update), the patch will simply be ignored.
Cheers,
Lain