set "wmic=wmic path Win32 networkadapter where NetConnectionStatus="2" get NetConnectionID /value"
for /f "tokens=2 delims==" %%a in (' "%wmic%" ') do set IfName=%%a
netsh int ip set address name="%IfName%" static 192.168.0.1 255.255.255.0 192.168.0.254