I am using python script and win32serviceutil module in order to stop and start Windows services. I am a member of group ‘local administrators’. I login as that member and run the script but get the error: Access denied. If I start cmd prompt as Administrator and the run from that window it works fine. My question: how inside the script I could specify to run it as administrator? (note: I don’t know administrator password) Thanks
Share
It suggested to use batch file which will call python script and on the top of that batch use PowerShell command to elevate privilage.
It worked for me.
Ticket could be closed