DesktopECHO / Pi-Hole-for-WSL1

Ad-blocking DNS server for Windows • Unbound pre-configured • Deployment ready in minutes • Does not require hypervisor/docker
359 stars 54 forks source link

Automatic task start fails #117

Closed WillScarlettOhara closed 5 months ago

WillScarlettOhara commented 6 months ago

Hi,

I can't make it work. Error code 2147943726. It seems to be a authentification problem. I use an online Microsoft account to login.

image image

I tried to change user with my Microsoft account credentials but I can't. image image

The problem can be quickly fixed with a shortcut in the start menu for a pi-hole startup after login. The problem is that I'm letting a bit of tracking through at each startup. Though, I use a Microsoft account to connect to Windows, so there's no point in fighting Microsoft's tracking, I guess.

For info, I use 2FA and a Windows Hello PIN but I have disabled the credentials request at startup.

Thanks

DesktopECHO commented 6 months ago

You may want to create a local/service account on your machine and install Pi-hole under that account.
Then you can set that account to launch the Pi-hole scheduled task at system start-up.

The problem is that I'm letting a bit of tracking through at each startup.

This shouldn't happen if Pi-hole is your only DNS server, the lookups should fail. If you have other DNS servers defined then you will still see ads intermittently.

WillScarlettOhara commented 6 months ago

Thank you. I've since reinstalled Windows and the task starts up fine. I don't understand it but it works.

Another topic but what preferred DNS server should I use in IPv4 windows network properties? Some tutorials put 127.0.0.1 others 192.168.X.X? What about IPv6 DNS? ::1?

DesktopECHO commented 6 months ago

Another topic but what preferred DNS server should I use in IPv4 windows network properties?

In this situation, Pi-hole is running locally on the same device so IPv4 localhost (127.0.0.1) will work.

WillScarlettOhara commented 5 months ago

Thanks

alainbryden commented 5 months ago

For what it's worth - I experienced the automatic task start failure as well. I had initially followed instructions to set to "Run whether user is logged in or not", and the scheduled task wouldn't get run at startup.

Anecdotally, I got it working by just reverting to the default setting "Run only when user is logged on"

There are similar reported problems floating around, not sure if related: