VB Script Returns Null

Microsoft Windows vista home premium w/s...
April 3, 2011 at 18:33:58
Specs: Windows 7
I am trying to use VB to store this registry key in a verible
[HKEY_CURRENT_USER\Software\Classes\ChromeHTML\shell\open\command]
@="\"C:\\Users\\rlong1\\AppData\\Local\\Google\\Chrome\\Application\\chrome.exe\" -- \"%1\""

This is the code i am using

strComputer = "."
Set oReg = GetObject("winmgmts:{impersonationLevel=impersonate}!\\" & strComputer & "\root\default:StdRegProv")

oReg.GetStringValue &H80000001,"\Software\Classes\ChromeHTML\shell\open\command","@",strRegKey

WScript.Echo(strRegKey)

However it keeps comming back as null

i have tried the following
oReg.GetStringValue &H80000001,"\Software\Classes\ChromeHTML\shell\open\command","Default",strRegKey
oReg.GetStringValue &H80000001,"\Software\Classes\ChromeHTML\shell\open\command","(Default)",strRegKey
oReg.GetStringValue &H80000001,"\Software\Classes\ChromeHTML\shell\open\command",,strRegKey
oReg.GetStringValue &H80000001,"\Software\Classes\ChromeHTML\shell\open\command",strRegKey

And i still have no luck.
Suggestion please?


See More: VB Script Returns Null

Report •


#1
April 3, 2011 at 18:58:12
Try:
oReg.GetStringValue &H80000001, "Software\Classes\ChromeHTML\shell\open\command", , strRegKey

How To Ask Questions The Smart Way


Report •

#2
April 3, 2011 at 19:01:59
Okay so you need a space. thats different. okay that works fine however im trying to write to the registry key and change it. however its not setting..


Report •

#3
April 3, 2011 at 19:20:40
Okay so you need a space.
No, you don't; it just looks better. You can't start your registry key with a backslash.

How To Ask Questions The Smart Way


Report •

Related Solutions


Ask Question