Page 1 of 1 1
Topic Options
#77935 - 2001-06-13 03:03 AM KIX-WRITEVALUE: problems with WriteValue & REG_NONE
MCA Offline
KiX Supporter
*****

Registered: 2000-04-28
Posts: 5152
Loc: Netherlands, EU
Dear,

After a personal request we were interesting by the above problem.

The result after a writevalue operation with reg_none should be

code:

REGEDIT4

[HKEY_CURRENT_USER\Software\Zone Labs\ZoneAlarm\DialogControl]
"ShutdownDialog"=hex(0):00,00,00,00
"DeskbandDialog"=hex(0):00,00,00,00



but it will be
code:

REGEDIT4

[HKEY_CURRENT_USER\Software\Zone Labs\ZoneAlarm\DialogControl]
"ShutdownDialog"=hex(0):00,00,00,00
"DeskbandDialog"=hex(0): ; <+++ (zero-length binary value)


The result of writevalue operation with reg_binary will be, but it
isn't correct.

code:

REGEDIT4 ; <+++ reg_binary

[HKEY_CURRENT_USER\Software\Zone Labs\ZoneAlarm\DialogControl]
"ShutdownDialog"=hex(0):00,00,00,00
"DeskbandDialog"=hex:00,00,00,00


Script for checking it:

code:

? ReadType ("HKEY_CURRENT_USER\Software\Zone Labs\ZoneAlarm\DialogControl", "DeskbandDialog")
ReadValue("HKEY_CURRENT_USER\Software\Zone Labs\ZoneAlarm\DialogControl", "DeskbandDialog")
? ReadType ("HKEY_CURRENT_USER\Software\Zone Labs\ZoneAlarm\DialogControl", "ShutdownDialog")
ReadValue("HKEY_CURRENT_USER\Software\Zone Labs\ZoneAlarm\DialogControl", "ShutdownDialog")
?
IF (WriteValue("HKEY_CURRENT_USER\Software\Zone Labs\ZoneAlarm\DialogControl", "DeskbandDialog", "00000000", "REG_NONE") <> 0)
? @error+" "+@serror
ENDIF
?
? ReadType ("HKEY_CURRENT_USER\Software\Zone Labs\ZoneAlarm\DialogControl", "DeskbandDialog")
ReadValue("HKEY_CURRENT_USER\Software\Zone Labs\ZoneAlarm\DialogControl", "DeskbandDialog")
? ReadType ("HKEY_CURRENT_USER\Software\Zone Labs\ZoneAlarm\DialogControl", "ShutdownDialog")
ReadValue("HKEY_CURRENT_USER\Software\Zone Labs\ZoneAlarm\DialogControl", "ShutdownDialog")


Have anyone an idea to do it with usage of kixtart only. REGEDIT may
not be used.
The results are the same for kixtart 3.63 & kixtart 4.00 beta 2a.
Greetings.

------------------
Site map:

_________________________
email scripting@wanadoo.nl homepage scripting@wanadoo.nl | Links | Summary of Site Site KiXforms FAQ kixtart.org library collection mirror MCA | FAQ & UDF help file UDF kixtart.org library collection mirror MCA | mirror USA | mirror europe UDF scriptlogic library collection UDFs | mirror MCA

Top
#77936 - 2001-06-13 03:28 PM Re: KIX-WRITEVALUE: problems with WriteValue & REG_NONE
Shawn Administrator Offline
Administrator
*****

Registered: 1999-08-13
Posts: 8611
MCA,

My take on REG_NONE has always been that it is used primarily to initalize an "emtpy" value - a value that has no data stored in it ... I just tried it in a KiX script and it worked (eg, no data and correct type assigned). When using readtype() and readvalue() I get the expected results - type = REG_NONE and value = nothing.

-Shawn


Top
#77937 - 2001-06-13 10:03 PM Re: KIX-WRITEVALUE: problems with WriteValue & REG_NONE
MCA Offline
KiX Supporter
*****

Registered: 2000-04-28
Posts: 5152
Loc: Netherlands, EU
Dear Shawn,
Our interpretation was the same, but in this case a value has been
assigned to it.
With kixtart we can't get the same effect.
Greetings.

[This message has been edited by MCA (edited 13 June 2001).]

_________________________
email scripting@wanadoo.nl homepage scripting@wanadoo.nl | Links | Summary of Site Site KiXforms FAQ kixtart.org library collection mirror MCA | FAQ & UDF help file UDF kixtart.org library collection mirror MCA | mirror USA | mirror europe UDF scriptlogic library collection UDFs | mirror MCA

Top
#77938 - 2001-06-14 01:05 AM Re: KIX-WRITEVALUE: problems with WriteValue & REG_NONE
Shawn Administrator Offline
Administrator
*****

Registered: 1999-08-13
Posts: 8611
MCA,

Ahhh... ok ... you're right (per usual) ...

That's the weirdest thing. When one goes
into regedt32 and creates a value of
type "REG_NONE" - regedt32 doesn't show any
data (ok) ... then if one double-clicks on
the value - it allows one to enter binary
data (which I did) and save it back - but
then regedt32 still doesn't show you a
value (in the value list on the right)...
then if one double-clicks on the value
again - the binary edit screen appears and
sure enough - there's the data !!! It's
like it's "hidden" away in registry
somewhere ...

Yeah - and since you were able to export the
data portion of one of these REG_NONE keys,
then it sort of hints that there is a
problem with KiXtart - and not the registry
api's !!! Right on !

Now I'm wondering how some of the reskit
utilities deal with this - like reg.exe -
hmmm .... have you tried it ?

-Shawn

-Shawn

[This message has been edited by Shawn (edited 14 June 2001).]

Top
Page 1 of 1 1


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

Who's Online
0 registered and 515 anonymous users online.
Newest Members
gespanntleuchten, DaveatAdvanced, Paulo_Alves, UsTaaa, xxJJxx
17864 Registered Users

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