def get_shortcuts_folder():
if get_root_hkey()==winreg.HKEY_LOCAL_MACHINE:
try:
fldr = get_special_folder_path("CSIDL_COMMON_PROGRAMS")
except OSError:
# No CSIDL_COMMON_PROGRAMS on this platform
fldr = get_special_folder_path("CSIDL_PROGRAMS")
else:
# non-admin install - always goes in this user's start menu.
fldr = get_special_folder_path("CSIDL_PROGRAMS")
try:
install_group = winreg.QueryValue(get_root_hkey(),
root_key_name + "\\InstallPath\\InstallGroup")
except OSError:
vi = sys.version_info
install_group = "Python %d.%d" % (vi[0], vi[1])
return os.path.join(fldr, install_group)
# Get the system directory, which may be the Wow64 directory if we are a 32bit
# python on a 64bit OS.
评论列表
文章目录