def GetPythonwExePath():
    """ Get path to current version of pythonw.exe """
    pythonExePath = ""
    try:
        pythonwExeName = "pythonw.exe"
        pythonInstallHiveKey = win32con.HKEY_LOCAL_MACHINE
        pythonInstallKey = r"Software\Python\PythonCore\%s\InstallPath" % sys.winver
        pythonInstallDir, typeId = ReadRegistryValue(pythonInstallHiveKey, pythonInstallKey, "")
        pythonwExePath = os.path.join(pythonInstallDir, pythonwExeName)
    except Exception, e:
        print "GetPythonExePath failed:", e
    return pythonwExePath
 Get path to current version of pythonw.exe 
recipes/Python/528893_PathCatcher__Windows_utility_rightclick_capture_/recipe-528893.py