I am trying to block the internet connection to a game (or all games) via a looping script. I want to block the internet connection, wait 1 second, and reenable the connection.
This is what I have so far:
Code: Select all
if not A_IsAdmin
{
Run *RunAs "%A_ScriptFullPath%"
ExitApp
}
Insert::Suspend
Loop {
Run, netsh advfirewall firewall set rule name="DeerHunter2012" new enable=yes,, hide ; Disables the internet connection
Sleep, 1000
Run, netsh advfirewall firewall set rule name="DeerHunter2012" new enable=no,, hide ; Enables the internet connection
}