Several ideas come to mind.
- Use Win32::TieRegistry to update the appropriate registry locations.
- Use Win32::GuiTest to automate the manual task of changing the information in Network Properties.
- Use Win32::API to access the Windows networking API directly.
I have probably forgotten a few ways too. ;-)