I want to start/stop a service (eg. someService) as administrator using Python in Windows. Right now I can think of two ways is either (1) using command lines in python codes (2) use some module to achieve this purpose directly in Python way.
I've tried the following codes but it returned "Access Denied".
import os
cmd = r"net stop someService"
os.system(cmd)
If anyone how to solve this, pls let me know thanks!