Tweets from pichat
| Follow my new user account @markseu About 2 months, 3 weeks ago from Pichat (Pichat Software) |
Tweets from 600infos
| I HAVE NYANED FOR 888.4 SECONDS! http://t.co/JQYOZebv via @nyannyancat About 3 months, 3 weeks ago from 600infos (Wolf) |
Trace: » plink tunnel » PuttyTabs » Create a random File » registry-switcher.cmd » sendEmail » Set a new IP Address
You are here: Pichat Wiki (en) » Snippets » Set a new IP Address
Set a new IP Address
- netsh_vmware_ip.cmd
@echo off set _int=VMware Network Adapter VMnet8 set _ip=192.168.134.1 set _sm=255.255.255.0 set _gw=192.168.134.2 set _me=10 set _dns1= set _dns2= set _wins1=192.168.134.2 set _wins2= rem activate debug with=%~n0.debug ... deactivate debug with =nul rem set _debug=nul set _debug=%~n0.debug echo.%date% %time% ### Reconfigure the Network Settings echo.Old Configuration: netsh int ip show config "%_int%" echo.New Configuration will be set with: echo. IP-Address = %_ip% echo. Subnetmask = %_sm% echo. Gateway = %_gw% echo. Metric = %_me% if defined _dns1 echo. 1. DNS-Server = %_dns1% if defined _dns2 echo. 2. DNS-Server = %_dns2% if defined _wins1 echo. 1 .WINS-Server = %_wins1% if defined _wins2 echo. 2. WINS-Server = %_wins2% set /p _wait=Start Configuration -<nul pause echo. set /p _wait=%date% %time% Set new parameters now...<nul echo.%date% %time% ### Start reconfiguring the Network Settings >%_debug% netsh int ip show config "%_int%" >>%_debug% echo.%date% %time% ip:%_ip% sm:%_sm% gw:%_gw% me:%_me% dns1:%_dns1% dns2:%_dns2% wins1:%_wins1% wins2:%_wins2% >>%_debug% set /p _wait=.<nul netsh int ip set address name="%_int%" static %_ip% %_sm% %_gw% %_me% >>%_debug% 2>&1 if defined _dns1 ( set /p _wait=.<nul netsh int ip set dns "%_int%" static %_dns1% >>%_debug% 2>&1 if defined _dns2 ( set /p _wait=.<nul netsh int ip add dns "%_int%" %_dns2% index=2 >>%_debug% 2>&1 ) ) if defined _wins1 ( set /p _wait=.<nul netsh int ip set wins "%_int%" static %_wins1% >>%_debug% 2>&1 if defined _wins2 ( set /p _wait=.<nul netsh int ip add wins "%_int%" %_wins2% index=2 >>%_debug% 2>&1 ) ) set /p _wait= done <nul echo. rem ipconfig /all netsh int ip show config "%_int%" echo. echo.%date% %time% ### FINISH ... Please verify now echo. netsh int ip show config "%_int%" >>%_debug% echo.%date% %time% ### FINISH ... Please verify now >>%_debug% set /p _wait=Close Script -<nul pause