Skip to content

PedramDindari/Corruption-Toolbox

Repository files navigation

Corruption Toolbox for Windows

Set of scripts to detect and repair system corruption for Windows. (eg. disk fail, file system errors, etc.)

Usage

  1. Clone the repository to some folder, or just downloads and extract it.

  2. It's usually advised to start with Checkup.bat; Right-click on it and select Run as Admin.

  3. Paste this in an admin PowerShell:

    cd '~\Documents\Scripts\Corruption Toolbox\' # Change to repo directory
    $VerbosePreference = 'Continue'
    & .\filediff.ps1 -Verbose 4>&1 | Tee ~\Desktop\diff.log
    & .\filerestorer_smart.ps1
    & .\Heuristic_corruption_finder.ps1 -Verbose 4>&1 | Tee ~\Desktop\heu.log

    If you don't want the extra verbose outputs, or the console logs, simply run them like this:

    cd '~\Documents\Scripts\Corruption Toolbox\' # Change to repo directory
    & .\filediff.ps1
    & .\filerestorer_smart.ps1
    & .\Heuristic_corruption_finder.ps1
  4. Run this in the directory that to_bash_script.txt (created from previous step, desktop by default). Before that, the to_bash_script.txt should be edited to have its address style mathching your bash engine (e.g. /c/ or /mnt/c/), encoded in UTF-8 with LF line endings.

    cd ~/Desktop
    bash bash_deeper_heuristic.sh

    Assuming bash is an alias for msys2, mingw, or wsl ... (everything running bash in windows), with windows admin access (that is different from sudo in the linux-side). You may need to set executable using chmod +x depending on your platform.

  5. Run regread.ps1 as admin. You can run this anytime because it doesn't depend on previous steps.

  6. You can run the Reset... batch files if you have issues in those areas. (Run as admin as always).

Dependencies

  1. You should have a bash interpreter on windows to run deeper heuristics (and some utility bash scripts). This can be ideally MSYS2/MinGW (they are also available in git-bash) or cygwin. You can also use WSL2 with cross OS file access, but most tools used in this repo assume windows awareness to some degree (preferably compiled for windows). The path schemes used in this repo use MSYS2 or git-bash style.

  2. You should have 7z and rar/unrar CLI executables installed on your system and added to PATH so they are available in powershell and your bash interpreter. (look at item 1)

About

Set of scripts to detect and repair system corruption in Windows. (e.g. disk fail, file system errors, etc.)

Topics

Resources

License

Stars

Watchers

Forks

Contributors