Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- :: Set IP Ethernet Static / DHCP
- :: setip d | Set Ethernet as DHCP
- :: setip s 100 |
- @echo off
- IF "%1%" == "s" (
- CMD /c netsh.exe interface ipv4 set address name=\"Ethernet\" static 192.168.%2.22 255.255.255.0 192.168.%2.1
- )
- IF "%1%" == "d" (
- :: runas /user:ldtuyen "cmd.exe /c netsh.exe interface ipv4 set address name=\"Ethernet\" source=dhcp"
- CMD /c netsh.exe interface ipv4 set address name=\"Ethernet\" source=dhcp
- )
- IF "%1%" == "h" (
- echo "setip s 100 -- Set Ethernet as Static 192.168.100.22"
- echo "setip d -- Set Ethernet as DHCP "
- )
- :: ./netsh interface ipv4 set address name="Ethernet" static 192.168.0.2 255.255.255.0 192.168.0.1
- :: ./netsh interface ipv4 set address name="Ethernet" source=dhcp
Add Comment
Please, Sign In to add comment