is there a way to....

freaky88

Banned
Local time
3:38 PM
Messages
262
is there a way to make a .bat file to automatically change my dns?
 

My Computer

Computer Manufacturer/Model Number
Emachines 1331G
OS
MS Windows 7 Home Premium 64-bit
CPU
AMD Athlon II X2 235 Regor 45nm Technology 2.7 Ghz
Motherboard
eMachines MCP61PM-GM (CPU 1)
Memory
6.0GB Dual-Channel DDR2 @ 401MHz (5-5-5-18)
Graphics Card(s)
1024MB GeForce 9800 GT (Pny) overclocked at 662
Sound Card
Speakers (Realtek High Definition Audio)
Monitor(s) Displays
Generic Non-PnP Monitor @ 1280x1024
Screen Resolution
1280x1024
Hard Drives
733GB Seagate ST375052 8AS SCSI Disk Device (IDE)
PSU
450W
Case
not sure
Cooling
fan/air
Keyboard
Standard PS/2 Keyboard
Mouse
Microsoft PS/2 Mouse
Internet Speed
26mbps
Sure, you can have it call netsh:
Code:
::// Below sets a network card called "Local Area Connection" to use 192.168.0.1 and 192.168.0.2
::// Use netsh interface ipv4 show interfaces to get the "name" of the LAN connection(s):
netsh interface ipv4 set dnsservers name="Local Area Connection" static 192.168.0.1 validate=no
netsh interface ipv4 add dns "Local Area Connection" 192.168.0.2 index=2 validate=no

::// Below will set the interface back to getting the data from a DHCP server:
netsh interface ipv4 set dnsservers name="Local Area Connection" dhcp
 

My Computer

Computer type
PC/Desktop
Computer Manufacturer/Model Number
Custom
OS
Windows 10 Pro x64
CPU
Intel Core i7 4790K @ 4.5GHz
Motherboard
Asus Maximus Hero VII
Memory
32GB DDR3
Graphics Card(s)
Nvidia GeForce GTX970
Sound Card
Realtek HD Audio
Screen Resolution
1920x1200
Hard Drives
1x Samsung 250GB SSD
4x WD RE 2TB (RAIDZ)
PSU
Corsair AX760i
Case
Fractal Design Define R4
Cooling
Noctua NH-D15
Back
Top