Windows.py 文件源码

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

项目:lib9 作者: Jumpscale 项目源码 文件源码
def setValueFromRegKey(self, key, valueName, valueData, valueType):
        """Sets a value in a key

        @param key: The registry key that holds the value to set. If the key does not exist, it will be created. The key should include the section. Eg. "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion"
        @type key: string
        @param valueName: The name of the value to set
        @type valueName: string
        @param valueData: The data to assign to the value
        @type valueData: string
        @param valueType: The type of the value
        @type valueType: WinRegValueType
        """
        hkey, key = self._getHiveAndKey(key)
        aReg = reg.ConnectRegistry(None, hkey)
        aKey = reg.CreateKey(aReg, key)
        reg.SetValueEx(aKey, valueName, 0, valueType.type, valueData)
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号