My friend Juan Carter always has corrupt Windows files. This little program is designed to fix issues related to corrupt Windows files. However, it works under the pretense that System File Checker (SFC), Deployment Image Servicing, Management (DISM), and Check Disk (CHKDSK) are still functioning on your PC. If SFC, DISM, and CHKDSK are themselves corrupt, this program won't be able to help. Run the program and then restart your PC, and all should work like a charm.
- What does this program do?
- How to use it?
- Prerequisites
- Download Project Files
- Install MinGW Compiler
- Compile and Run the Program
- Commands Used
- Notes
- Troubleshooting
- Disclaimer
- License
This program opens CMD as an administrator and runs a series of commands to fix any corrupt files on your Windows machine.
Note: Marked as a virus until I can get it signed, just compile for now!
- Download the repository as a zip file.
- Extract the zip file.
- Open the project folder, then open the subfolder called
EXE
. - Run the
FixMyCorruptWindows.exe
file. - If your antivirus or Windows flags the file as unsafe, you can click "More info" and choose "Run anyway".
Before you can run this project, you will need:
- A Windows PC
- Internet connection
- FMWC project files or GIT
- Command prompt access with administrator privileges
- A C++ compiler (MinGW is recommended)
-
Clone the repository from GitHub. Open the command prompt and run the following command:
git clone https://github.com/GioMonci/Fix-My-Corrupt-Windows.git
-
Navigate to the downloaded project directory:
cd Fix-My-Corrupt-Windows-main
-
Go to the GitHub repository page: GitHub Repository.
-
Click on the green Code button, then select Download ZIP.
-
Once the ZIP file is downloaded, extract it to a folder of your choice.
-
Open the command prompt and navigate to the folder where you extracted the files:
cd path\to\extracted\folder
-
Open the command prompt as an administrator.
-
Install the MinGW package manager using the following command:
winget install -e --id MinGW.Mingw
-
Add MinGW to your system path by setting the environment variables:
- Press
Win + R
, typesysdm.cpl
, and hit Enter. - In the System Properties window, go to the Advanced tab and click Environment Variables.
- Under System variables, find
Path
and click Edit. - Click New and add the path to your MinGW
bin
folder (e.g.,C:\MinGW\bin
). - Click OK to save and close all dialogs.
- Press
-
Verify that MinGW was added successfully by running:
g++ --version
-
Navigate to the project directory:
cd Fix-My-Corrupt-Windows-main
-
Compile the program using the g++ compiler:
g++ -o FMCW main.cpp logs.cpp shellExecuteInfoAsAdmin.cpp
-
After compilation, run the resulting executable:
FMCW.exe
-
Follow the on-screen prompts to specify your PC's status level and begin the repair process.
This program runs the following commands to fix corrupt Windows files:
-
System File Checker (SFC):
- Scannow:
sfc /scannow
This scans and repairs corrupted system files.
- Scannow:
-
Deployment Image Servicing and Management (DISM):
-
ScanHealth:
dism /online /cleanup-image /scanhealth
This checks the health of the Windows image.
-
CheckHealth:
dism /online /cleanup-image /checkhealth
This checks if the Windows image is repairable.
-
RestoreHealth:
dism /online /cleanup-image /restorehealth
This repairs the Windows image.
-
-
Check Disk (CHKDSK):
- CheckDisk:
chkdsk C: /f /r /x
Scans your hard drive for file system errors.
- CheckDisk:
- Read the instructions in the program thoroughly.
- Ensure you run the program with administrative privileges.
- Restart your computer after running the program to apply the changes.
- If you encounter any issues, make sure that SFC and DISM are not corrupted themselves.
-
MinGW not found: If
g++
is not recognized, ensure MinGW is properly installed and added to the system's environment variables. -
Compilation errors: Ensure all necessary files (
main.cpp
,logs.cpp
,shellExecuteInfoAsAdmin.cpp
, and header files) are present in the directory.
Use this program at your own risk. The author is not responsible for any potential damage to your system.
This project is licensed under the MIT License. See the LICENSE
file for details.