Jan-16-2019, 08:57 PM
(This post was last modified: Jan-16-2019, 09:49 PM by aniyanetworks.)
(Jan-16-2019, 06:54 PM)nilamo Wrote: Is that all your code? A function doesn't do anything if you don't call it.
Sort of like a bike. It won't move anywhere just because you have one, you need to use it for it to move. Otherwise it'll just sit there, in the corner, silently judging you.
Hello Nilamo,
Thank you for your correction
import os os.system("netsh interface show interface") def enable(): os.system("netsh interface set interface 'Wi-Fi' enabled") enable()This is my actual code.
i also tried
import subprocess def enable(): subprocess.call('netsh interface set interface "Wi-Fi" enabled') enable()
Output:The requested operation requires elevation (Run as administrator).
Process finished with exit code 0
But it is not working. Please advise.i also tried
import subprocess def enable(): subprocess.call('netsh interface set interface "Wi-Fi" enabled') enable()
Output:The requested operation requires elevation (Run as administrator).
Process finished with exit code 0
I tried to run as administrator in CMD, but didn't work as well.Please advise.
Thank you.