[reply]schtasks /delete /tn "自动设置DefaultSwitch网络IP地址" /f
schtasks /create /tn "自动设置DefaultSwitch网络IP地址" /tr "c:\AutoStart\自动设置网卡IP.bat" /sc onstart /rl highest
schtasks /delete /tn "AutoDefaultSwitchIP" /f
schtasks /create /tn "AutoDefaultSwitchIP" /tr "c:\AutoStart\AutoDefaultSwitchIP.bat" /sc onlogon /rl highest
SCHTASKS /DELETE /TN "自动设置DefaultSwitch网络IP地址" /F
SCHTASKS /CREATE /TN "自动设置DefaultSwitch网络IP地址" /TR "C:\AutoStart\自动设置网卡IP.bat" /SC ONEVENT /EC System /MO *[System/EventID=232] /RL HIGHEST
SCHTASKS /DELETE /TN "自动设置DefaultSwitch网络IP地址(WINLOGON7001)" /F
SCHTASKS /CREATE /TN "自动设置DefaultSwitch网络IP地址(WINLOGON7001)" /TR "C:\AutoStart\自动设置网卡IP.bat" /SC ONEVENT /EC System /MO *[System/EventID=7001] /RL HIGHEST
SCHTASKS /DELETE /TN "自动设置DefaultSwitch网络IP地址(WINLOGON7002)" /F
SCHTASKS /CREATE /TN "自动设置DefaultSwitch网络IP地址(WINLOGON7002)" /TR "C:\AutoStart\自动设置网卡IP.bat" /SC ONEVENT /EC System /MO *[System/EventID=7002] /RL HIGHEST
命令行自动设置IP地址:
netsh interface set interface "vEthernet (Default Switch)" enabled
@REM choice /t 10 /d y /n >nul
netsh interface ip set address name="vEthernet (Default Switch)" source=static addr=192.168.100.1 mask=255.255.255.0
netsh interface set interface "vEthernet (Default Switch)" disabled
@REM choice /t 10 /d y /n >nul
netsh interface set interface "vEthernet (Default Switch)" enabled
[/reply]
schtasks /delete /tn "自动设置DefaultSwitch网络IP地址" /f
schtasks /create /tn "自动设置DefaultSwitch网络IP地址" /tr "c:\AutoStart\自动设置网卡IP.bat" /sc onstart /rl highest
schtasks /delete /tn "AutoDefaultSwitchIP" /f
schtasks /create /tn "AutoDefaultSwitchIP" /tr "c:\AutoStart\AutoDefaultSwitchIP.bat" /sc onlogon /rl highest
SCHTASKS /DELETE /TN "自动设置DefaultSwitch网络IP地址" /F
SCHTASKS /CREATE /TN "自动设置DefaultSwitch网络IP地址" /TR "C:\AutoStart\自动设置网卡IP.bat" /SC ONEVENT /EC System /MO *[System/EventID=232] /RL HIGHEST
SCHTASKS /DELETE /TN "自动设置DefaultSwitch网络IP地址(WINLOGON7001)" /F
SCHTASKS /CREATE /TN "自动设置DefaultSwitch网络IP地址(WINLOGON7001)" /TR "C:\AutoStart\自动设置网卡IP.bat" /SC ONEVENT /EC System /MO *[System/EventID=7001] /RL HIGHEST
SCHTASKS /DELETE /TN "自动设置DefaultSwitch网络IP地址(WINLOGON7002)" /F
SCHTASKS /CREATE /TN "自动设置DefaultSwitch网络IP地址(WINLOGON7002)" /TR "C:\AutoStart\自动设置网卡IP.bat" /SC ONEVENT /EC System /MO *[System/EventID=7002] /RL HIGHEST
命令行自动设置IP地址:
netsh interface set interface "vEthernet (Default Switch)" enabled
@REM choice /t 10 /d y /n >nul
netsh interface ip set address name="vEthernet (Default Switch)" source=static addr=192.168.100.1 mask=255.255.255.0
netsh interface set interface "vEthernet (Default Switch)" disabled
@REM choice /t 10 /d y /n >nul
netsh interface set interface "vEthernet (Default Switch)" enabled