Skip to content

Instantly share code, notes, and snippets.

@Frankz
Created August 16, 2018 18:39
Show Gist options
  • Save Frankz/7a03386d6aa18f4fb361d6190676cbc9 to your computer and use it in GitHub Desktop.
Save Frankz/7a03386d6aa18f4fb361d6190676cbc9 to your computer and use it in GitHub Desktop.
#!/usr/bin/env bash
# Sometimes Windows presents this issue https://answers.microsoft.com/en-us/windows/forum/windows_10-files-winpc/windows-10-file-explorer-windows-dont-refresh/32e5292b-333d-4b7c-a099-549831aa9339
# This is a git-bash script for add to .bash_profile and have at hand this tool
# More about DISM - https://docs.microsoft.com/en-us/windows/desktop/win7appqual/dism-replaces-pkgmgr-peimg-and-intlconfg-tools
function fixRefresh() {
DISM.exe -Online -Cleanup-image -Restorehealth; if [[ $? > 0 ]]; then echo "FAIL - DISM Restorehealth, trying now with DISM StartComponentCleanup"; Dism.exe -online -Cleanup-Image -StartComponentCleanup; fi
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment