SharePoint 2016 setup fails because AppFabric installation returns MSI 1603
Initial Symptoms
During SharePoint 2016 setup, the AppFabric prerequisite failed consistently.
The visible symptoms were:
- SharePoint setup stops at AppFabric installation.
- The installer reports
MSI error 1603. - Retrying with local installation media produces the same failure.
Error Message in Detail
At first glance, the failure looks generic:
AppFabric installation failed because installer MSI returned with error code : 1603
In AppFabric setup logs, the sequence looked like this:
Process.Start: C:\Windows\system32\msiexec.exe ... AppFabric-1.1-for-Windows-Server-64.msi ...
Process.ExitCode: 0x00000643
Error Setup AppFabric installation failed because installer MSI returned with error code : 1603
1603 is a fatal MSI error, but it is only a wrapper and not the real root cause.
The actual reason was in the custom action log:
EXEPATH=powershell.exe PARAMS=-command "$str = [System.Environment]::GetEnvironmentVariable(...PSModulePath...);
$str = $str+";c:\Program Files\AppFabric 1.1 for Windows Server\PowershellModules";
c:\Windows\system32\setx.exe /M PSModulePath "$str""
Error: c:\Windows\system32\setx.exe : ERROR: Invalid syntax. Default option is not allowed more than '2' time(s).
ExitCode=1
So AppFabric did not fail on core binaries, it failed while updating the machine-wide PSModulePath with setx.
Root Cause
In this case, PSModulePath on the server environment was not in a healthy state.
Common patterns that trigger this failure:
PSModulePathis too long for reliablesetxhandling.- Broken structure in the value (double separators like
;;, trailing;, malformed fragments). - Existing content that is interpreted as additional options by
setx.
This causes the custom action to exit with code 1, which then bubbles up as MSI 1603.
Where to Find the Real Error
Do not stop at the top-level setup error. Open the two log files referenced by the installer:
AppServerSetup1_1(...).logAppServerSetup1_1_CustomActions(...).log
The custom actions log is usually where the actionable error appears.
Quick Verification Checklist
Before reinstalling, validate these points:
- Read current machine
PSModulePath:
[System.Environment]::GetEnvironmentVariable("PSModulePath", "Machine")
- Check for obvious corruption (
;;, trailing;, strange tokens). - Verify the value is not excessively long.
- Re-run setup only after cleaning the environment value.
Resolution Path
In my case, the fix was to normalize PSModulePath first, then run AppFabric setup again.
Example minimal reset values:
setx /M PSModulePath "C:\Windows\System32\WindowsPowerShell\v1.0\Modules"
setx /M PSModulePath "C:\Windows\System32\WindowsPowerShell\v1.0\Modules;C:\Program Files\WindowsPowerShell\Modules"
After correcting the machine environment variable, the AppFabric installation completed successfully and SharePoint setup continued.
Conclusion
MSI 1603 during SharePoint 2016 prerequisite installation is often too generic to troubleshoot directly. In this case, the real blocker was a malformed or oversized PSModulePath value that broke the AppFabric setx custom action. The key is to inspect the custom action log, repair the environment variable, and then rerun setup.