title: python : open commad as administrator execute a command to stop a service
body: <p>I am trying to open a cmd prompt to "run as administrator", in order to stop a service using net stop.</p>
  
  <p>however nothing seems to be working, i have tried the following, </p>
  
  <pre><code>import os
  import subprocess
  
  subprocess.Popen(['runas', '/user:Administrator', '', 'cmd.exe', 'net stop "Cisco AnyConnect Secure Mobility Agent"'])
  </code></pre>
  
  <p>please can someone help with this </p>