I've been using ICS successfully for years, but now I'm looking for a way to control it through something else than the GUI in Control Panel\Network and Internet\Network Connections -> Connection Properties:
I want to do everything that the encircled checkbox does and more, without touching any GUI. This leads me to the following subquestion:
What does the checkbox do?
Microsoft don't provide specific information and the most helpful forum post I've found is from 2003. Assuming that some of the advice is still valid, I've come to the conclusion that ICS is broken down into 6 parts that have to be set up individually:
- the sharedAccess service
- interface settings
- firewall rules
- a static route
I've already learned that the service can be started/stopped with the command net start/stop sharedAccess and that netsh is a good tool for changing the interface settings and the firewall rules. But I don't understand how ICS handles routing and DNS. All hosts in my network are configured statically, so I don't care much about autodhcp.
Thanks for your help!
EDIT: I spent a day following Randolph West's advice and analyzed the output in ProcMon. I saw reads and writes to both the registry and the filesystem, and it was too difficult for me to understand what exactly it all meant - except that an API was being called.