Skip to content

Instantly share code, notes, and snippets.

@ur0n2
Last active May 22, 2017 03:41
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ur0n2/a1f51e7b6e4fff5583e689a0d2b637c9 to your computer and use it in GitHub Desktop.
Save ur0n2/a1f51e7b6e4fff5583e689a0d2b637c9 to your computer and use it in GitHub Desktop.
windows x86/x64 program files path classification in python
import os
prgm_path = ""
if os.environ.get("PROGRAMFILES(X86)") is None: #this case is 32bit
prgm_path = os.environ.get("PROGRAMFILES")
else:
prgm_path = os.environ.get("PROGRAMFILES(X86)")
#print prgm_path
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment