NOTE: You MUST enable "Ask administrator permission in compiler options!!!
Code: Select all
RunProgram("netsh"," int ip reset","",#PB_Program_Wait)
Delay(1000)
RunProgram("netsh"," winsock reset","",#PB_Program_Wait)
Delay(1000)
RunProgram("ipconfig"," /release","",#PB_Program_Wait)
Delay(1000)
RunProgram("ipconfig"," /renew","",#PB_Program_Wait)
Delay(1000)
RunProgram("ipconfig"," /flushdns","",#PB_Program_Wait)
Delay(1000)
;ipconfig /registerdns","",#PB_Program_Wait)
Delay(1000)
;NETSH winsock reset catalog","",#PB_Program_Wait)
Delay(1000)
RunProgram("NETSH"," int ipv4 reset reset.log","",#PB_Program_Wait)
Delay(1000)
RunProgram("NETSH"," int ipv6 reset reset.log","",#PB_Program_Wait)
Delay(1000)
MessageRequester("All restarted","please try your network again")
https://answers.microsoft.com/en-us/win ... 7f0445032a
Tested on my Win 11 and Win 7 machines - all good.
I named my compiled copy: RestartNetwork.exe