def _get_registered_executable(exe_name):
registered = None<EOL>if sys.platform.startswith('<STR_LIT>'):<EOL><INDENT>if os.path.splitext(exe_name)[<NUM_LIT:1>].lower() != '<STR_LIT>':<EOL><INDENT>exe_name += '<STR_LIT>'<EOL><DEDENT>import _winreg <EOL>try:<EOL><INDENT>key = "<STR_LIT>" + exe_name<EOL>value = _winreg.QueryValue(_winreg.HKEY_LOCAL_MACHINE, key)<EOL>registered = (value, "<STR_LIT>"+key)<EOL><DEDENT>except _winreg.error:<EOL><INDENT>pass<EOL><DEDENT>if registered and not os.path.exists(registered[<NUM_LIT:0>]):<EOL><INDENT>registered = None<EOL><DEDENT><DEDENT>return registered<EOL>
Windows allow application paths to be registered in the registry.