[SOLVED] KB3191566 installation failure on Win7

viktor_

Contributor
Joined
Dec 17, 2023
Posts
19
I am trying to install powershell 5.1 (KB3191566) on my windows 7 laptop. Installation terminates just saying that it failed. Most of my searches lead me to this forum, where I found out that this problem is not that uncommon, but each solution is different for a particular computer. So I run SURT (KB947821) but that one ended saying that it's not installed either. As I thought that my problems affecting KB3191566 installation might have been solved anyway, I run that one again but this time it just got stuck on 'Initializing installation'. So I cancelled it and gave SURT a second chance. It finished the same way as the first time.

Previously I have tried everything: installing WMF 4.5, 5.0; trying with .NET framework 4.5, 4.7.2 and 4.8. Nothing worked, each WMF installation failed.

ComponentsScanner reported 4,000 issues or so. I am attaching exported CBS folder and scanner report.

Many thanks for your help.
 

Attachments

Hello and welcome,

There are some registry corruptions to be fixed.

Step 1:
Export registry as hive
  • Click on the Start button and in the search box, type regedit
  • When you see regedit on the list, right-click on it and select Run as administrator.
  • When regedit opens, using the left pane, navigate to the following registry key and select it by clicking on it once.
    HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Component Based Servicing

  • Once selected, click File > Export....
  • Change the Save as type: to Registry Hive Files (*.*).
  • Name this file ComponentBasedServicing (with no file extension) and save it to your Desktop.
  • Right-click on the saved file and choose Send To -> Compressed (zipped) Folder.
  • Attach the .ZIP file to your next post.
  • If the file is too large to upload here, please upload to Gofile or WeTransfer and just provide the downloadlink here.

Step 2:
Provide the Components Hive
1. Navigate to C:\Windows\System32\Config and locate the COMPONENTS file.
2. Please copy this file to your desktop.
Note: If you receive an error that this file is in-use, simply reboot your computer and try again. Note: If you find that you need to reboot and are unable to because this is a server then try Option#2 below.
3. Right-click on this file on your desktop and select Send To...Compressed (zipped) folder. This will create a file named COMPONENTS.ZIP on your desktop.
4. The file will likely be too large to upload here so please upload to Gofile or WeTransfer and just provide the link here.


Option#2 (only if you are unable to follow the previous instructions)

  • Please download the Freeware RegBak from here: Acelogix Software - Download products
    You will find it at the bottom of the page that the link brings you to.
  • Go ahead and install this program and accept all the defaults. After the last install screen the program should open.
  • Click the New Backup button. Accept the defaults and simply click Start.
  • When it says Finished successfully, click the Close button.
  • This will bring you back to the main screen of the program. You will see one entry in this list with the date that you did it. Right-click on this line-item and select Explore Backup...
  • This will bring you into the folder where the backup was made. You should see a Users folder and a Windows folder along with a couple other files. Double-click on the Windows folder to open it. Then open the System32 folder and then config folder. You should see around 6 files in here, one of which is named COMPONENTS.
  • Copy the COMPONENTS file to your Desktop. If the COMPONENTS file does not exist, please fetch it instead from C:\Windows\System32\config\COMPONENTS.
  • Now right-click on the COMPONENTS file that is on your desktop and select Send to > Compressed (zipped) folder.
  • Then please upload the zip file (COMPONENTS.zip) to your favourite file sharing website (it will be too big to upload here). Examples of services to upload to are Gofile or WeTransfer and then just provide the link in your reply.
  • You can close any open windows you have as well as the RegBak program now.
 
Warning: This script was written specifically for this user, for use on that particular machine. Do not run this script on another machine.
  1. Download the Farbar Recovery Scan Tool and save it to your Desktop:
    64-bit: Downloading Farbar Recovery Scan Tool
    Note: Your antivirus program may report FRST incorrectly as an infection. If so, disable the real-time protection when downloading and running FRST.
  2. Download the attachment fixlist.txt and save it to your desktop.
  3. Right-click on FRST64.exe and select "Run as administrator".
  4. Press the Fix button.
  5. The tool will now process fixlist.txt.
  6. If for some reason the tool needs a restart, please make sure you let the system restart normally. After that let the tool complete its run.
  7. When finished, a log called Fixlog.txt will appear in the same directory the tool is run from.
  8. Attach the logfile Fixlog.txt to your next reply.
 

Attachments

Provide a fresh copy of the components hive.
 
I removed a corrupt registry key from your COMPONENTS hive.

Replace Components Hive

Warning: this fix is specific to the user in this thread. No one else should follow these instructions as it may cause more harm than good. If you are after assistance, please start a thread of your own.
  1. Download the attachment COMPONENTS.ZIP and save it to your desktop.
  2. Right-click on it and select Extract all.... Make sure the "Show extracted files when complete" is checked and click Extract.
  3. Now we have the COMPONENTS file that we will be using to replace your current one.
  4. Navigate to C:\Windows\System32\config
  5. Right-click on the current COMPONENTS file and select rename. Rename it to COMPONENTS.bad.
    Note: If you get an error that the file is in use, reboot your computer and then try again.
  6. Take the file from the Components folder on your desktop and paste it into C:\Windows\System32\config
Let me know if the hive was replaced or if there were any errors.
 

Attachments

I have managed to rename the existing COMPONENTS file right away and replace it with the new one. There were no errors, neither after replacing the file nor after rebooting the system.
 
Great.

Follow the instructions below to run a scan with the System Update Readiness Tool (SURT) and provide a log.
  1. Download SURT for your system. (Windows 7 SP1 x64)
  2. Once downloaded, execute the installer, and go through the installation (this process can take around 15-20 minutes).
  3. On completion, a log will be created in C:\Windows\Logs\CBS\CheckSUR.log.
  4. Attach this log to your next reply.
Alternatively, if these instructions are unclear for you, you can follow the tutorial below.
System Update Readiness Tool (SURT)
 
Indeed it lasted 15 minutes. I haven't noticed progress bar moving, but installation itself reported no errors. Here is the requested log file.
 

Attachments

Step 1:
Warning: This script was written specifically for this user, for use on that particular machine. Do not run this script on another machine.
  1. Download the attachment fixlist.txt and save it to your desktop.
  2. Right-click on FRST64.exe and select "Run as administrator".
  3. Press the Fix button.
  4. The tool will now process fixlist.txt.
  5. If for some reason the tool needs a restart, please make sure you let the system restart normally. After that let the tool complete its run.
  6. When finished, a log called Fixlog.txt will appear in the same directory the tool is run from.
  7. Attach the logfile Fixlog.txt to your next reply.

Step 2:
Start the System Update Readiness Tool (SURT) again.
On completion, attach the logfile C:\Windows\Logs\CBS\CheckSUR.log to your next reply.
 

Attachments

Great. The CheckSur log is clean.

Step 1:
Restart the computer.
Open an elevated command prompt.
Copy and paste the following commands into it, press enter after each.

Code:
sfc /scannow
Wait for this to finish before you continue

Code:
copy %windir%\Logs\CBS\cbs.log "%userprofile%\Desktop\cbs.txt"
This will create a file, cbs.txt on your Desktop. Zip this file and attach the zipped cbs.txt to your next post.


Step 2:
  • Run the tool
    61f7aba7309a1-ComponentsScanner_Icon.png
    ComponentsScanner again.
  • Once complete, a report will be saved to your desktop called ComponentsScanner.txt.
  • Attach that file to your next reply.
 
Step 1:
Warning: This script was written specifically for this user, for use on that particular machine. Do not run this script on another machine.
  1. Download the attachment fixlist.txt and save it to your desktop.
  2. Right-click on FRST64.exe and select "Run as administrator".
  3. Press the Fix button.
  4. The tool will now process fixlist.txt.
  5. If for some reason the tool needs a restart, please make sure you let the system restart normally. After that let the tool complete its run.
  6. When finished, a log called Fixlog.txt will appear in the same directory the tool is run from.
  7. Attach the logfile Fixlog.txt to your next reply.

Step 2:
  • Run the tool
    61f7aba7309a1-ComponentsScanner_Icon.png
    ComponentsScanner again.
  • Once complete, a report will be saved to your desktop called ComponentsScanner.txt.
  • Attach that file to your next reply.
 

Attachments

Try to install KB3191566 again.
If it fails, copy the file C:\Windows\Logs\CBS\cbs.log to your desktop.
Zip the copied file and attach the zipped cbs.log to your next reply.
 
FRST Registry Search
  1. Click the Start button and choose Control Panel.
  2. In the upper right corner ensure the View by: is set to Category.
  3. Select the Programs group.
  4. Click the Turn Windows features on or off link. This will bring up the Server Manager or Windows Features dialog.
    Note: This loads your components hive which is what we want. Please keep this dialog open while you perform the remaining steps. You can minimize it if you wish but keep it open.
    Note: Your antivirus program may report FRST incorrectly as an infection. If so, disable the real-time protection when downloading and running FRST.
  5. Right-click on the file FRST64.exe and choose Run as administrator.
  6. Copy and paste Microsoft-Management into the Search box and click the Search Registry button.
  7. When the scan is complete, a message will display that 'SearchReg.txt' is saved in the same folder FRST was started from. Notepad will open this file also. Close Notepad and attach the file 'SearchReg.txt' to your next reply.
  8. You may close any remaining open windows now.
 

Has Sysnative Forums helped you? Please consider donating to help us support the site!

Back
Top