It's not hard to understand that I don't "speak" any of program language. I dicided to write my 1st code or program that makes computer turn off the Ethernet and the turn it on immediately.
First of all I've created .bat file called disableint.bat that DISABLES Ethernet
Code: Select all
netsh interface set interface name="Ethernet" admin=DISABLED
Code: Select all
netsh interface set interface name="Ethernet" admin=ENABLED
1st file called disableint.vbs
Code: Select all
'HideBat.vbs
CreateObject("Wscript.Shell").Run "disableint.bat", 0, True
Code: Select all
'HideBat.vbs
CreateObject("Wscript.Shell").Run "enableint.bat", 0, True
Then I've created AHK script called disethernet.ahk
Code: Select all
F5::
RunWait, "C:\Users\User\Desktop\disableint.vbs
RunWait, "C:\Users\User\Desktop\enableint.vbs
return
Can you help me what's the problem?
I know that I could make whole code way easier and shorter but it's my first work, it will next thing that I'll correct after successful launch.