Create SetupComplete.cmd

This commit is contained in:
Molly Lau 2023-07-02 16:12:01 +09:00 committed by GitHub
parent 304fb32d3f
commit 84ee544829
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View 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