a batch script to modify internet otion lan setting

Started by mioo_sara, April 22, 2023, 01:30:27 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

mioo_sara

hi to every one

i have a batch script that change lan setting

@ECHO OFF
ECHO Configuring Proxy Settings! please wait...
REG ADD "HKCU\Software\Microsoft\Windows\CurrentVersion\Internet Settings" /v ProxyEnable /t REG_DWORD /d 1 /f
REG ADD "HKCU\Software\Microsoft\Windows\CurrentVersion\Internet Settings" /v ProxyServer /t REG_SZ /d 192.168.170.22:8080 /f
EXIT


but how can i read from a config.txt  and copy (ip) its third line(192.168.152.138)  and replace  it with  my  batch  script?
i hope  that would  be  clear

my  confg.txt content
QuoteInterface: 192.168.152.181 --- 0xc
  Internet Address      Physical Address      Type
  192.168.152.138       4e-53-d0-68-34-bf     dynamic   

note== config.txt (ip) will be change every day

thanks again

mioo_sara

this should not difficult  for  all theses masters  of the forum