Jump to content

Sky Slate Blueberry Blackcurrant Watermelon Strawberry Orange Banana Apple Emerald Chocolate
Photo

Enable/Disable Firewall Rule


  • Please log in to reply
No replies to this topic
DemonicKing
  • Members
  • 4 posts
  • Last active: Oct 25 2015 06:51 PM
  • Joined: 05 Apr 2015

So I found this which is what I'm looking for - basically press a key to toggle on/off a firewall rule. Unfortunately I get a call to nonexistent function error which I have no idea how to fix. 

F3::NetConnect(1)
F2::NetConnect(0)


NetConnect(Enable = 0) { If Enable = 1 { run, netsh advfirewall firewall set rule name="Rust" new enable=no } Else { run, netsh advfirewall firewall set rule name="Rust" new enable=yes }
}