regutil.py 文件源码

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

项目:purelove 作者: hucmosin 项目源码 文件源码
def RegisterShellCommand(shellCommand, exeCommand, shellUserCommand = None):
    # Last param for "Open" - for a .py file to be executed by the command line
    # or shell execute (eg, just entering "foo.py"), the Command must be "Open",
    # but you may associate a different name for the right-click menu.
    # In our case, normally we have "Open=Run"
    base = "%s\\Shell" % RegistryIDPyFile
    if shellUserCommand:
        win32api.RegSetValue(win32con.HKEY_CLASSES_ROOT , base + "\\%s" % (shellCommand), win32con.REG_SZ, shellUserCommand)

    win32api.RegSetValue(win32con.HKEY_CLASSES_ROOT , base + "\\%s\\Command" % (shellCommand), win32con.REG_SZ, exeCommand)
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号