chris20147
MIS
I would like to use the RegRead command to return specific registry data. The registry key is HKLM\hardware\devicemap\video\ and the value is \Device\Video0. The problem seems to be that the value begins with a "\". I can get other values to return data within the same key but when I try to use the \Device\Video0 value, I get an invalid root error. Is there any way around this?
Thanks for your help!
This code works:
This code, which is what I need, does not work:
Thanks for your help!
This code works:
Code:
Dim WSHShell, RegKey, VideoPath
Set WSHShell = WScript.CreateObject("WScript.Shell")
RegKey="HKLM\hardware\devicemap\video\VgaCompatible"
VideoPath=WSHShell.RegRead(RegKey)
WScript.echo "Path to video: " & VideoPath
This code, which is what I need, does not work:
Code:
Dim WSHShell, RegKey, VideoPath
Set WSHShell = WScript.CreateObject("WScript.Shell")
RegKey="HKLM\hardware\devicemap\video\\Device\Video0"
VideoPath=WSHShell.RegRead(RegKey)
WScript.echo "Path to video: " & VideoPath