Skip to content

Latest commit

 

History

6 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Overview

Run executable file, with option to try as admin on error on Windows.

Usage

The following example opens a temporary file in the root of C:. This should prompt the user to permit the process to run with elevated privileges.

import sys
import tempfile

t = tempfile.mktemp(dir='C:/')

run_exe(sys.executable, ''' -c "'''
        '''import os;'''
        '''open('%s', 'wb')'''
        '''os.remove(%s)"''' % (t, t),
        try_admin=True)

About

Run executable file, with option to try as admin on error on Windows.

Resources

Stars

4 stars

Watchers

1 watching

Forks

Releases

Packages

Used by

Contributors

Languages