Installation & Licensing Center
HOW TO - Check & Repair Windows Installation
Authored by Caleb Scharf September 18th, 2024 8480 views 2 likes KB956131
Description
Ansys and other applications rely on Windows OS files and components and a healthy Windows OS is a pre-requisite to running Ansys successfully. A corrupt/unhealthy Windows installation can cause problems with Ansys software such as applications not opening properly, applications crashing/hanging, blue screens, problems with Windows updates not installing or other errors that are hard to pin down. The following procedure will check and resolve issues with a corrupt Windows Installation and/or Windows update mechanism.
Warning
The steps in this article (based on this Microsoft article) provide a good starting point for identifying and fixing corrupt Windows system files. However, each problem is different, and the troubleshooting process may diverge from the steps below and require help and expertise from your IT Department to troubleshoot further.
Solution
Important
Screen shot any errors you receive while running the steps below so they can be researched later.
Step #1 - Run Windows Updates
Windows updates contain OS fixes that can resolve issues you may be experiencing. Additionally, if they fail to run or install, this tells us there is a deeper problem with OS system files.
- Windows Search > search and select Check for Updates > select Check for Updates
- Install all Windows Updates and restart if necessary.
- If you experience problems or errors while updating Windows, please see HOW TO - Troubleshoot Windows Update Errors. If you are performed these steps, please continue to the next step.
Step #2 - Run Windows Check Disk
-
Open an Administrator Command Prompt and run the following command:
Note: You can use this same command prompt windows to perform all the commands in this article.
chkdsk c:
- If this step detects errors run the following command to schedule a repair.
chkdsk c: /r
- Restart your computer and allow the repair process to occur.
- Ensure this was successful by Re-Running "chkdsk c:" as you did the steps above and insure there are no errors.
- Lastly, if errors were found in your initial check, we recommend running Crystol Disk Info, which can check the health of your hard drive and ensure a failing hard drive is not the root cause of the disk errors.
- Disk errors can also be caused by improper shutdowns or other software/hardware errors.
Step #3 - Verify Windows Installation Health
-
Open a Administrator Command Prompt and run the following commands sequentially.
- This ScanHealth command performs an advanced scan to determine if there are any corruptions inside the local Windows 10 image. Proceed to next step no matter the result.
DISM /Online /Cleanup-Image /ScanHealth
- This ScanHealth command performs an advanced scan to determine if there are any corruptions inside the local Windows 10 image. Proceed to next step no matter the result.
Success Example | Error Example |
This indicates there is a problem with the Windows OS health
|
- Whether there are errors or not in the previous step, run the following command.
- If there are problems with the system image, this command will automatically scan and repair common issues.
DISM /Online /Cleanup-Image /RestoreHealth
- If there are problems with the system image, this command will automatically scan and repair common issues.
Success Example | Error Example |
|
This indicates there is a problem with the Windows OS health |
- If you encounter errors, run the following command and then repeat the /RestoreHealth command above.
dism.exe /online /Cleanup-Image /StartComponentCleanup
- If the RestoreHealth command continues to produce errors, this means that the local files cannot be used to perform the cleanup and you will need to create and attach an OS installation disk/ISO and run the following command (modifying the source path as necessary).
dism /online /cleanup-image /restorehealth /source:WIM:d:\sources\install.wim:2 /limitaccess
Note: If there are errors in this step, you will need to contact your IT support team to troubleshoot further or perform a fresh reinstall of the Windows OS. - Run the repair command
- This command will attempt to perform the repairs to your OS. If this step does not complete successfully, you will need to troubleshoot further with your IT department or reinstall your OS.
sfc /scannow
- This command will attempt to perform the repairs to your OS. If this step does not complete successfully, you will need to troubleshoot further with your IT department or reinstall your OS.
Success Examples | Error Examples |
This example indicates, with a reasonable degree of confidence, that there isn't nor was problems with the Windows OS health:
This example indicates there was problems with your OS, but it should be fixed now: *To be thorough, we recommend running sfc /scannow again, to verify everything was repaired successfully. |
This indicates there is a problem with the Windows OS health and it was not repaired - possibly because the previous steps did not complete successfully. |