mirror of
https://github.com/leitbogioro/Tools.git
synced 2025-12-17 16:08:23 +08:00
Create SetupComplete.cmd
This commit is contained in:
parent
304fb32d3f
commit
84ee544829
1 changed files with 19 additions and 0 deletions
19
Linux_reinstall/Windows/SetupComplete.cmd
Normal file
19
Linux_reinstall/Windows/SetupComplete.cmd
Normal file
|
|
@ -0,0 +1,19 @@
|
||||||
|
@echo off
|
||||||
|
|
||||||
|
set setmode=on
|
||||||
|
::Static IP
|
||||||
|
set staticip=ipAddr
|
||||||
|
::Subnet
|
||||||
|
set subnetmask=actualIp4Subnet
|
||||||
|
::Gateway
|
||||||
|
set gateways=ipGate
|
||||||
|
::Dns
|
||||||
|
set dnsserver1=ipDNS1
|
||||||
|
set dnsserver2=ipDNS2
|
||||||
|
|
||||||
|
echo;%setmode%|find "on"&&goto:enable||goto:disable
|
||||||
|
:enable
|
||||||
|
wmic nicconfig where ipenabled=true call enablestatic(%staticip%),(%subnetmask%)
|
||||||
|
wmic nicconfig where ipenabled=true call setgateways(%gateways%)
|
||||||
|
wmic nicconfig where ipenabled=true call setdnssuffixsearchorder(%dnsserver1%,%dnsserver2%)
|
||||||
|
:disable
|
||||||
Loading…
Add table
Reference in a new issue