I want to run a windows command with Python 3. Like this os.system(\"echo hi\"). However, How about running a command that requires admin access? How do you do this? Thanks.
You can do this with the ShellExecuteEx Win32 API wrapper included in the Pywin32 extensions. If you are using something like ActivePython you may already have the extensions.
To use ShellExecuteEx :
import win32com.shell.shell as shell
commands = 'echo hi'
shell.ShellExecuteEx(lpVerb='runas', lpFile='cmd.exe', lpParameters='/c '+commands)