code: def _getRegisteredExecutable(exeName):
      """Windows allow application paths to be registered in the registry."""
      registered = None
      if sys.platform.startswith("win"):
          if os.path.splitext(exeName)[1].lower() != ".exe":
              exeName += ".exe"
          import winreg
  
          try:
              key = (
                  "SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\App Paths\\"
                  + exeName
              )
              value = winreg.QueryValue(winreg.HKEY_LOCAL_MACHINE, key)
              registered = (value, "from HKLM\\" + key)
          except winreg.error:
              pass
          if registered and not os.path.exists(registered[0]):
              registered = None
      return registered
  
file_path: python-markdown2/tools/which.py
imports: import os
  import sys
  import getopt
  import stat
label_desc: Use image node_id 1 for calling a global function with example usage: _getRegisteredExecutable(exeName) and returns: registered