Skip to main content

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

Project description

# 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)

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

run-exe-0.5.post2.zip (17.3 kB view details)

Uploaded Source

File details

Details for the file run-exe-0.5.post2.zip.

File metadata

  • Download URL: run-exe-0.5.post2.zip
  • Upload date:
  • Size: 17.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for run-exe-0.5.post2.zip
Algorithm Hash digest
SHA256 4dca71023bd084c842c7710638e789f515b6c5502eded21d21e9325dcdf58405
MD5 279af7cb5240fc1aa325bfad648ba6fc
BLAKE2b-256 a06a8d30bccecc4239ab3d59b1640c3310a6ff41fa471f786a81fc8ade0dc88b

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page