Software Deployment Question
installing Windows Management Framework 5 (PowerShell 5) as post installation task
Trying to install PowerShell 5 to Windows 7 scripted install. It has 2 dependencies, .net4.5 and WMF4 (powershell4)
I have the .net4.5.2 install working fine
I set the WMF4 install task to Windows6.1-KB2819745-x64-MultiPkg.msu /quiet /log:%temp%\posh4install.log (I also tried PoSH4-Windows6.1-KB2819745-x64-MultiPkg.msu /quiet /forcereboot)
When running the scripted install, it shows that it is running the WMF4 task, reboots, then shows that it is running the WMF4 package. It then fails with return code 2359302 which is pretty well documented online as occurring because the package is already installed. I can confirm that it has version 4 of Powershell by launching Powershell and running $PSVersionTable.
If I tell it to continue, it follows the same steps for WMF5.0. I can then confirm that PowerShell 5 is installed because $PSVersionTable shows version 5. I then continue and the rest of the scripted install runs with no problems.
Not sure how to eliminate the error so it continues without the errors.
Answer Chosen by the Author
Your.msu /quiet /norestart
if %errorlevel% equ 0 goto EXITOK
if %errorlevel% equ 1641 goto EXITOK
if %errorlevel% equ 1707 goto EXITOK
if %errorlevel% equ 3010 goto EXITOK
exit /b %errorlevel%
exit /b 0