diff --git a/Linux_reinstall/Windows/SetupComplete.bat b/Linux_reinstall/Windows/SetupComplete.bat index 0a30d14..a0d90e5 100644 --- a/Linux_reinstall/Windows/SetupComplete.bat +++ b/Linux_reinstall/Windows/SetupComplete.bat @@ -17,7 +17,9 @@ for /f "tokens=2" %%a in ('echo list vol ^| diskpart ^| findstr "\<%systemDisk%\ echo;%setmode%|find "on"&&goto:enable||goto:disable :enable wmic nicconfig where ipenabled=true call enablestatic(%staticip%),(%subnetmask%) +::Using IPv4 of local server as a temporary "gateway" to make sure all of static IPv4 configs can be recognized by network service. wmic nicconfig where ipenabled=true call setgateways(%staticip%) +::Replace temporary gateway to an actual one. wmic nicconfig where ipenabled=true call setgateways(%gateways%) wmic nicconfig where ipenabled=true call setdnsserversearchorder(%dnsserver1%,%dnsserver2%) del %0