Hello Sysnative Forums,
I'm here today - as I'm sure the majority of us are - as I've run into an on-going problem with my laptop that I've been unable to resolve after an exhaustive number of attempts trying to fix it. Before I get into the problem, would like to mention that all the required logs, as well as some system information (hardware/software related) is provided below the summary of the problem to help diagnose the source of the issue. If anything further is required from me, such as running additional software for further data collection/logs I would be more than happy to do so, just let me know. (FYI I do have a background in IT as well, hence why I am surprised I'm so stumped).
Problem Description:
TL;DR/Problem: Unable to update Powershell (PS) from PS 2.0 to PS 5.1. Attempted to update it via Windows Update for WMF5.1 (PS 5.1 installer: KB3191566) which fails with the notice that Windows was unable to install the update. Tried uninstalling & re-installing Microsoft .NET 4.7.2 which resulted in the re-install of the Framework failing with the error that it's somehow already installed even though I uninstalled it cleanly using "Uninstall Programs" in Control Panel. Have reset Windows 7 update components, repaired them, and repaired the entire Windows 7 installation and nothing fixed it. Still unable to re-install .NET Framework and upgrade powershell which I need to fix.
I discovered this problem while attempting to update my Powershell (PS) version as I was working on project for work that requires the Azure/AzureAD modules in Powershell 5+ (PS 5). Given I have always had automatic updates turned on, and always check it myself once every few days to a week to see what optional upgrades (if any) are there as well as ensuring recent updates were all still installing automatically - I figured it would be no problem to update PS. Pulled up the
MS instructions on updating to PS 5/5.1, DL'd the required package "Win7AndW2K8R2-KB3191566-x64.zip" and confirmed that I already had the required MS Management installed, up-to-date MS .Net (had 4.7.2 installed at the time), and all MS patches/security fixes were up to date so nothing else should have been needed. The install ran, almost looking as if it was going to complete, then it failed stating that Windows was not able to successfully install the required update KB3191566. I tried manually installing the update as well from downloading it, then running it from an elevated command prompt to no avail as well as following this guide that attempts to run it from an elevated powershell with custom arguments to avoid any GUI prompts
this guide (
Installing PowerShell 5.1), then I tried running the Windows Update Troubleshooter tool which completed by failed to resolve 2 of the errors it detected even after reboot/re-run/clearing the Windows Update Logs/Files from disk clean-up... nothing fixed it.
Following this, I tried tons of different solutions I found online, tried all my recovery points I'd created, did a hard reset on the Windows Update tool which recreated the SoftwareDistributions folder, cleared/re-created windows update cache, unregistered the services & some DLL's/registry files, then re-registers them to the machine (Followed this guide:
https://support.microsoft.com/en-us/help/971058/how-do-i-reset-windows-update-components) and nothing seemed to work. Running out of options, I then moved to uninstall the WMF Framework from my PC and reinstall it to see if maybe it was related to a corrupt installation of my Microsoft .NET Framework which, unluckily for me, resulted in a new problem & set of errors as now I'm without any MS .Net framework AND unable to install it back on the PC as it throws the error:
Final Result: Installation failed with error code: (0x80070643), "Fatal error during installation. " (Elapsed time: 0 00:09:23)
then if I look inside the additional log file "Microsoft .NET Framework 4.5 Setup_20190227_115913732-MSI_netfx_Full_x64.msi.txt" I see another error that states:
Action ended 12:08:33: FindRelatedProducts. Return value 1. Action start 12:08:33: CA_BlockOlderVersionInstall. MSI (s) (10:2C) [12:08:33:641]: Product: Microsoft .NET Framework 4.5 -- A later version of Microsoft .NET Framework 4.5 is already installed. A later version of Microsoft .NET Framework 4.5 is already installed. Action ended 12:08:33: CA_BlockOlderVersionInstall. Return value 3. Action ended 12:08:33: INSTALL. Return value 3.
even though I have no .NET framework installed in the list of all my programs nor anywhere I can locate on the system.
Given all this, I went for the second to last ditch effort Monday/Tuesday (yesterday, 2/26) and attempted a repair install of my Windows 7 installation to see if that would fix the issues as it would replace the Windows system files that were seemingly corrupt (even though SFC never showed any issues). However... after the repair install, the .Net 4.5 Framework STILL threw the same error. Now, if I attempt to install the WMF5.1 package, it errors out since I do not have any .Net framework installed, but if I attempt to install the .Net 4.5 framework, it throws an error saying there is that version or higher installed even though there still is not a single one installed. (Also, the registry key under HKEY_CURRENT_USER\Software\Microsoft\Windows NT\Current Version\AppCompatFlags\Layers & ..\AppCompatFlags\Compatibility Assistant\Persisted\ does not show anything related to DOTNET or .NET which is where windows puts the flags for programs that installed/failed to install "correctly" which apparently can cause this issue, but doesn't apply here).
I would really like to resolve this Windows Update issue so that I can properly upgrade my Powershell to version 5.1
Quick Overview of Attempted Solutions (from above):
- Run Windows Update to install all necessary upgrades (All worked besides 2)
- Run Windows Update Repair tool
- Delete Windows Update cache (Disk Clean-up, ran on mostly all options)
- Hard/Full reset on Windows Update Components (Stopping & re-registering services, clearing cache & SoftwareDistro folders, etc)
- Manually attempted Windows Updates via elevated Powershell and CMD
- Attempted re-installs of WMF3.0-5.1, select Windows Updates associated with Powershell and/or WMF and/or Windows MMC (Management Console)
- Performed all the standard system scans: SFC /scannow, DISM /online /scanhealth, chkdsk /r, [in-safe mode] sfc /scannow, etc.
- Repaired Windows 7 Pro installation
- Run Microsoft .NET Framework Installation Repair Tool
- Using Elevated Powershell + DISM/WUSA commands, removed KB updates one by one then re-installed them in this fashion
- Run the "System Update Readiness Tool for Windows 7" numerous times
- Created fresh, new Administrator accounts on PC to attempt to install updates from there
Links to Logs:
- SFC /scannow: Beginning verification phase of system scan // Verification 100% complete. // Windows Resource Protection did not find any integrity violations.
- SURT/DISM Scan:
- SURT Install: "Installation Finished Successfully!" message appeared, no errors or issues here.
- DISM: Running "DISM /Online /Cleanup-Image" in an elevated cmd prompt resulted in no major errors being pointed out & since I'm running Win 7, I cannot use the /restorehealth argument. (Can provide my entire log if needed as it goes as far back as 2017-08-10.)
- SFCFix: Ran, received ERRNO 2 on one of the screens where it checks the CBS log. (Unfortunately was unable to capture it in time since it registered my "Ctrl+C" as a keypress and went to next screen)
SFCFix version 3.0.1.0 by niemiro.
Start time: 2019-02-27 13:14:08.223
Microsoft Windows 7 Service Pack 1 - amd64
Not using a script file.
AutoAnalysis::
SUMMARY: No corruptions were detected.
AutoAnalysis:: directive completed successfully.
Successfully processed all directives.
Failed to generate a complete zip file. Upload aborted.
SFCFix version 3.0.1.0 by niemiro has completed.
Currently storing 0 datablocks.
Finish time: 2019-02-27 13:18:06.186
----------------------EOF-----------------------
- CBS Logs: FULL/ALL CBS Logs can be downloaded here. I've only attached the TOP LEVEL CBS.txt log here as the others total ~30mb in the zip archive.
- Microsoft .NET 4.5 Framework (Additional Log): These two logs are created when I attempt to install the MS .Net 4.5 Framework and show the same error each time. Download here.
Laptop Technical Specs:
- Laptop: HP Elitebook 850 G1
- OS: Windows 7 Professional [SP1] — 64 Bit (Factory Install / OEM Key) -- Up to date
- Processor: Intel i7-4600U @ 2.10Ghz-2.70Ghz
- RAM/Memory: 8GB DDR3
- HDD: 500 GB
- "Relevant" Software: Malwarebytes, BitDefender [currently disabled], SQL Server (2014), IntelliJ IDE, Java JDK, Ruby on Rails (+ necessary files ex: msys64), PostgeSQL, SQLite, Oracle (Database P/L/SQL)
Any and all help would be greatly appreciated as I currently cannot use my go-to work laptop for my assigned project due to this technical difficulty... I'm having to resort to using a back-up & much slower laptop in the mean time while this problem is being resolved. Again, I can provide any and all information that is required as necessary upon request and will get it over to whomever is providing assistance as quickly as humanly possible as I'd like to resolve this issue promptly.
Thank you in advance for anything & everything. Even if you just present a possible solution for me to attempt to fix it, I will be greatly and willing to explore mostly any option here (leaving a full re-install to the absolute last resort though).