Created
April 30, 2019 11:16
-
-
Save shahidcodes/1aac9e029e6ca9de187a8960525f67bb to your computer and use it in GitHub Desktop.
windows 10 hidden host (marked as system file) fixed.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
From a command prompt with administrative access type each of the following commands: | |
CACLS.EXE C:\WINDOWS\system32\drivers\etc\hosts /G BUILTIN\Users:R | |
CACLS.EXE C:\WINDOWS\system32\drivers\etc\hosts /E /G "BUILTIN\Power Users:R" | |
CACLS.EXE C:\WINDOWS\system32\drivers\etc\hosts /E /G BUILTIN\Administrators:F | |
CACLS.EXE C:\WINDOWS\system32\drivers\etc\hosts /E /G "NT AUTHORITY\SYSTEM:F" | |
ATTRIB.EXE -S -H +A -R C:\WINDOWS\system32\drivers\etc\hosts | |
If this doesn't resolve the issue you will need a better program to do it. Download SubInACL from Microsoft. You can work up the syntax for taking ownership or I'll do it if you can't figure it out. | |
It should be something like: | |
SubInACL.EXE /file C:\WINDOWS\system32\drivers\etc\hosts /setowner=%USERDOMAIN%\%USERNAME% | |
then rerun the commands above. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment