Page 1 of 1 1
Topic Options
#36816 - 2003-02-21 08:09 PM REG_MULTI_SZ hex value
j95661 Offline
Getting the hang of it

Registered: 2001-02-27
Posts: 84
Loc: sacramento,ca usa
Im having a problem reading this REG_MULTI_SZ key and determining if I need to change the value or not.

When I export the key with regedit the value is

"VDD" = hex(7):00,00

Im not sure how to query for this value. my script below is writing the value each time it runs which I dont want to do.

code:
 ;****************************************************************************************
;
; Registry fix
; Virtual Device Driver Error Message in 16-Bit MS-DOS
; KB # 254914
If @INWIN = 1
$RegVal = ReadValue("Hkey_local_machine\System\CurrentControlSet\Control\VirtualDeviceDrivers","VDD")
If @error = 0
If $RegVal <> 1
$KeyLoc = "Hkey_local_machine\System\CurrentControlSet\Control\VirtualDeviceDrivers"
$KeyNam = "VDD"
$KeyVal = ""
$RC = WriteValue($Keyloc,$KeyNam,$KeyVal,"REG_MULTI_SZ")
EndIf
Else
$KeyLoc = "Hkey_local_machine\System\CurrentControlSet\Control\VirtualDeviceDrivers"
$KeyNam = "VDD"
$KeyVal = ""
$RC = WriteValue($Keyloc,$KeyNam,$KeyVal,"REG_MULTI_SZ")
EndIf
EndIf

_________________________
WonderBoy Constantly learning everyday, how much I dont know :-)

Top
#36817 - 2003-02-21 08:20 PM Re: REG_MULTI_SZ hex value
Les Offline
KiX Master
*****

Registered: 2001-06-11
Posts: 12734
Loc: fortfrances.on.ca
Well you query for the value now with:
$RegVal = ReadValue("Hkey_local_machine\System\CurrentControlSet\Control\VirtualDeviceDrivers","VDD")

So then, what does $RegVal contain and why do you do:
If $RegVal <> 1

It is supposed to be a multi string VarType and not an integer.
_________________________
Give a man a fish and he will be back for more. Slap him with a fish and he will go away forever.

Top
#36818 - 2003-02-21 08:29 PM Re: REG_MULTI_SZ hex value
j95661 Offline
Getting the hang of it

Registered: 2001-02-27
Posts: 84
Loc: sacramento,ca usa
Lights are on now and I think I'm home.. Didn't even think about the fact that I was evaluating it as a integer..

now using

If $RegVal not = ""

don't know if this is sloppy but it works.
_________________________
WonderBoy Constantly learning everyday, how much I dont know :-)

Top
Page 1 of 1 1


Moderator:  Jochen, Allen, Radimus, Glenn Barnas, ShaneEP, Ruud van Velsen, Arend_, Mart 
Hop to:
Shout Box

Who's Online
0 registered and 823 anonymous users online.
Newest Members
JimDunn, fgarcia, Viginette, ManuvdWielNL, Sir_Barrington
17890 Registered Users

Generated in 0.049 seconds in which 0.023 seconds were spent on a total of 12 queries. Zlib compression enabled.

Search the board with:
superb Board Search
or try with google:
Google
Web kixtart.org