So whenever I am in hotels (or other public networks) after I connect to the hotel network a browser window opens with a logon page or customer agreement.
How does Windows know to open a webpage when connecting to the network?
So whenever I am in hotels (or other public networks) after I connect to the hotel network a browser window opens with a logon page or customer agreement.
How does Windows know to open a webpage when connecting to the network?
Windows detects that there is an Captive Portal and lauches the browser. The page loaded is from the router of the establishment that redirects all http requests to their own webserver who hosts the login page. That way it is transparent to the end-user.
Once you have logged in, the router will then act as a proxy and let your requests go to the internet normally.
These systems are called Captive Portals. Here is the Wikipedia article on them: https://en.wikipedia.org/wiki/Captive_portal
Microsoft Windows does in fact automatically open a broswer window when it detects captive portals. Here is the MSDN article that describes this: https://msdn.microsoft.com/en-us/library/windows/hardware/dn408681.aspx