Hi all,
I've searched the site and google but can't seem to find a way to update a registry key with a hex value.
The variable called 'strNewValue' holds my hex value (hex:84,11,00,00). This causes a type mismatch error but I can't honestly say I know what the issue is.
I've tried multiple ways to accomplish this but none work.
Any advice?
Here is my code:
const HKEY_CURRENT_USER = &H80000001
strComputer = "."
Set oReg=GetObject("winmgmts:{impersonationLevel=impersonate}!\\" &_
strComputer & "\root\default:StdRegProv")
strKeyPath = "Software\Microsoft\Windows NT\CurrentVersion\Windows Messaging Subsystem\Profiles\Outlook\13dbb0c8aa05101a9bb000aa002fc45a"
strkeyvalue = "00036601"
strNewValue = "hex:84,11,00,00"
oReg.CreateKey HKEY_CURRENT_USER,strKeyPath
oReg.SetDWORDValue HKEY_CURRENT_USER,strKeyPath,strKeyValue,strNewValue
wscript.echo "success!
I've searched the site and google but can't seem to find a way to update a registry key with a hex value.
The variable called 'strNewValue' holds my hex value (hex:84,11,00,00). This causes a type mismatch error but I can't honestly say I know what the issue is.
I've tried multiple ways to accomplish this but none work.
Any advice?
Here is my code:
const HKEY_CURRENT_USER = &H80000001
strComputer = "."
Set oReg=GetObject("winmgmts:{impersonationLevel=impersonate}!\\" &_
strComputer & "\root\default:StdRegProv")
strKeyPath = "Software\Microsoft\Windows NT\CurrentVersion\Windows Messaging Subsystem\Profiles\Outlook\13dbb0c8aa05101a9bb000aa002fc45a"
strkeyvalue = "00036601"
strNewValue = "hex:84,11,00,00"
oReg.CreateKey HKEY_CURRENT_USER,strKeyPath
oReg.SetDWORDValue HKEY_CURRENT_USER,strKeyPath,strKeyValue,strNewValue
wscript.echo "success!