View Single Post
  #7  
Old December 4th 18, 07:48 AM posted to microsoft.public.windowsxp.general
R.Wieser
external usenet poster
 
Posts: 1,302
Default Registry: How ro create a REG_EXPAND_SZ default(!) string ?

JJ,

Well, that's because WinAPI's RegSetValue() / RegSetValueEx()
allow overwriting values with different type.


Yup. Too bad that they (whomever "they" are) forgot to incoorporate that
into regedit (forcing clumsy work arounds). They should maybe have called
it regwrite, instead of -edit.

Heck, I could even make a full-blown HTA from it. :-)


Please do. I'd be happy to check it.


I need to be carefull when doing that, its too tempting to try to "go big"
and recreate a full webbified regedit in it (I already feel that urge).
It needs to keep to the point, and small.

Regards,
Rudy Wieser

"JJ" wrote in message
...
On Mon, 3 Dec 2018 09:57:22 +0100, R.Wieser wrote:

"changing" the type of the "(default)" key (or any other I presume) seems
to
be surprisingly easy using a bit of vbscript: It doesn't even complain
when
overwriting the keys contents with a different type (in other words, no
"delete" step needed).


Well, that's because WinAPI's RegSetValue() / RegSetValueEx() allow
overwriting values with different type. We should be glad that WSH doesn't
put restriction on that.

If I want to go fancy I could throw an input box at it (for the "copy key
name" result), another for the data-field name (which *ofcourse* doesn't
get
included in the above), and than do the read/change type/write cycle
automatically.

Heck, I could even make a full-blown HTA from it. :-)


Please do. I'd be happy to check it.



Ads