@echo off
netsh interface ip set address "イーサネット" dhcp
netsh interface ip set dns "イーサネット" dhcp
netsh interface set interface "イーサネット" disable
netsh interface set interface "イーサネット" enable
if %errorlevel% neq 0 (
netsh interface ip set address "イーサネット 2" dhcp
netsh interface ip set dns "イーサネット 2" dhcp
netsh interface set interface "イーサネット 2" disable
netsh interface set interface "イーサネット 2" enable
echo アダプター名イーサネット 2を変更しました。
)else if %errorlevel% equ 0(
echo アダプター名イーサネットの設定を変更しました。
)else (
echo エラーで設定できませんでした。
)
pause
exit
More than 3 years have passed since last update.
Register as a new user and use Qiita more conveniently
- You get articles that match your needs
- You can efficiently read back useful information
- You can use dark theme