pywin32_postinstall.py 文件源码

python
阅读 26 收藏 0 点赞 0 评论 0

项目:remoteControlPPT 作者: htwenning 项目源码 文件源码
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.
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号