将值添加到3个注册表位置



我正在尝试向注册表中的3个位置添加一个值:

HKEY_CURRENT_USERSoftwareIntelIndeo
HKEY_LOCAL_MACHINESOFTWAREIntelIndeo
HKEY_USERSS-1-5-21-669792009-2657969199-152103076-1000SoftwareIntelIndeo

这是我需要添加到每个注册表路径的字符串:

"Options"="360611321911"

出于某种原因,我无法测试这段代码,只是看看它是否增加了值:

CreateObject("WScript.Shell").RegWrite "HKEY_USERSS-1-5-21-669792009-2657969199-152103076-1000SoftwareIntelIndeo", "C:Program FilesFastTunerClean.exe"

您可以将这两个函数添加到您的项目中,以使用注册表中的值:

' Write Reg:
'       Write to the Windows Registry
'       RegType should be 'REG_SZ' for string, 'REG_DWORD' for an integer,
'       'REG_BINARY' for a binary or boolean, and 'REG_EXPAND_SZ' for an expandable string
Function WriteReg(RegPath, Value, RegType)
Dim Key
Dim objRegistry
Set objRegistry = CreateObject("Wscript.shell")
Key = objRegistry.RegWrite(RegPath, Value, RegType)
WriteReg = Key
End Function
' Read Reg:
'       Read from the Windows Registry
Function ReadReg(RegPath)
Dim Key
Dim objRegistry
Set objRegistry = CreateObject("Wscript.shell")
Key = objRegistry.RegRead(RegPath)
ReadReg = Key
End Function

相关内容

  • 没有找到相关文章

最新更新