{"id":1631,"date":"2021-10-22T03:14:59","date_gmt":"2021-10-22T03:14:59","guid":{"rendered":"https:\/\/lgildv5i97.onrocket.site\/answers\/?post_type=question&#038;p=1631"},"modified":"2021-10-22T03:17:16","modified_gmt":"2021-10-22T03:17:16","slug":"solved-how-to-run-python-script-as-windows-administrator","status":"publish","type":"question","link":"https:\/\/computing.net\/answers\/programming\/how-to-run-python-script-as-windows-administrator\/29873.html","title":{"rendered":"Solved How To Run Python Script As Windows Administrator?"},"content":{"rendered":"<p>I am using python script and win32serviceutil module in order to stop and start Windows services. I am a member of group &#8216;local administrators&#8217;. 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&#8217;t know administrator password) Thanks<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"inline_featured_image":false,"iawp_total_views":17},"question-category":[55],"question_tags":[],"class_list":["post-1631","question","type-question","status-publish","hentry","question-category-programming"],"jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/computing.net\/answers\/wp-json\/wp\/v2\/question\/1631","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/computing.net\/answers\/wp-json\/wp\/v2\/question"}],"about":[{"href":"https:\/\/computing.net\/answers\/wp-json\/wp\/v2\/types\/question"}],"author":[{"embeddable":true,"href":"https:\/\/computing.net\/answers\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/computing.net\/answers\/wp-json\/wp\/v2\/comments?post=1631"}],"wp:attachment":[{"href":"https:\/\/computing.net\/answers\/wp-json\/wp\/v2\/media?parent=1631"}],"wp:term":[{"taxonomy":"question-category","embeddable":true,"href":"https:\/\/computing.net\/answers\/wp-json\/wp\/v2\/question-category?post=1631"},{"taxonomy":"question_tags","embeddable":true,"href":"https:\/\/computing.net\/answers\/wp-json\/wp\/v2\/question_tags?post=1631"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}