Create a batch file, put the below script in and run it as administrator.
@echo "Setting static IP."
@netsh interface ip set address "Ethernet0" static 192.168.1.100 255.255.255.0 192.168.1.1
@echo "Setting DNS."
@netsh interface ip set dns "Ethernet0" static 8.8.8.8