Skip to content

Instantly share code, notes, and snippets.

@okhiroyuki
Created November 18, 2015 06:47
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save okhiroyuki/63213b474f6f80409853 to your computer and use it in GitHub Desktop.
Save okhiroyuki/63213b474f6f80409853 to your computer and use it in GitHub Desktop.
固定IPアドレスの設定バッチ
@echo off
echo.
echo ===========================
echo 「IPアドレス」の設定 [固定]
echo ===========================
echo.
rem ----- 環境変数の設定 -----
set INTERFACE=イーサネット
set IP=192.168.100.1
set SUBNET=255.255.255.0
set GATEWAY=192.168.100.1
rem -----「IPアドレス」の設定 -----
netsh interface ipv4 set add name="%INTERFACE%" source=static addr="%IP%" mask="%SUBNET%" gateway="%GATEWAY%" gwmetric=1
exit
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment