After cleaning the remnants of avast, Windows should be able to rebuild the internet connection settins.
In fact, this problem shouldn't happen at all, so maybe something else is going on in your OS.
I would suggest, after removing avast's remnants, check the status of network drivers and Windows Firewall.
Please report back.