Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Hanging in Welcomescreen #2483

Open
LTN-byte opened this issue Oct 18, 2023 · 3 comments
Open

Hanging in Welcomescreen #2483

LTN-byte opened this issue Oct 18, 2023 · 3 comments

Comments

@LTN-byte
Copy link

Hello
My Win 11 hangs in "Welcome"-loadingscreen when i copy your hosts file and after a restart or the normal "end of day" shutdown, and when i then restart it on next day this happens.

If i then go into CMD with a win-bootstick and delete with CMD comands the hosts file everything is normal.

So what solution do you have? i cant use your hosts file because then my pc isnt usable...

thank you very much!

@welcome
Copy link

welcome bot commented Oct 18, 2023

Hello! Thank you for opening your first issue in this repo. It’s people like you who make these host files better!

@Lateralus138
Copy link
Contributor

Lateralus138 commented Oct 18, 2023

The Windows DNS Cache service has trouble parsing large HOSTS files with lots of entries and can make many parts of the Windows OS hang. You have 2 main options (disable DNS Cache service or compress the HOSTS file):

  1. Disable the DNS Cache (which I do not recommend) via the registry entry directly or edit the registry via an Administrative command line.
  • Registry directly: Open your chosen registry editor (default is regedit.exe via command line or search via your Start Menu) and search for the path HKLM\SYSTEM\CurrentControlSet\services\Dnscache, locate the 'Start' entry and change the value from 2 to 4 (back to 2 if you want to reenable the service).
  • Registry command line: Run REG add "HKLM\SYSTEM\CurrentControlSet\services\Dnscache" /v Start /t REG_DWORD /d 4 /f in an Administrative command line.

This option is more than likely also in the menu of the Services application, but more than likely it is grayed out and not editable.

Disabling the cache service can mess things up, the main example being WSL and therefore, as stated above, I do no recommend. Though, of course, that is your prerogative.

or

  1. You can compress the HOSTS file with either a script or compiled program, both of which you can find in the README of Steven's repo (2 of which are my tools). I recommend my program as it is way faster or one of the various scripts, but that's your choice.

If you need help with the whole process there are more in depth instructions at my scripts repository so you can grab my main program and then go to the scripts repo and use the same instructions just replacing the script with the tool part.

There's also a Python script somewhere for compression, but I'm not sure where nor am I familiar with it.

After compressing the HOSTS file everything should run very smoothly and fast and you'll still be able to utilize the DNS Cache service.

I hope this helps.

@broken-software
Copy link

There is similar discussion here at #2138.
For Windows, you can follow above recommendation. There isn't much Steven can do here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants