Anyone any idea?
Code: Select all
RunWaitOne(command) {
; WshShell object: http://msdn.microsoft.com/en-us/library/aew9yb99
shell := ComObjCreate("WScript.Shell")
; Execute a single command via cmd.exe
exec := shell.Exec(ComSpec " /C " command)
; Read and return the command's output
return exec.StdOut.ReadAll()
}
#^+w::MsgBox % RunWaitOne("netsh interface show interface") ; <-- Show netwotk interfaces
#!w:: ; <-- Disable wifi
RunAs Admin,,
MsgBox % RunWaitOne("netsh interface set interface name=""Wi-Fi"" disable")
RunAs
returnn