Jump to content
Strawberry Orange Banana Lime Leaf Slate Sky Blueberry Grape Watermelon Chocolate Marble
Strawberry Orange Banana Lime Leaf Slate Sky Blueberry Grape Watermelon Chocolate Marble

MSFN is made available via donations, subscriptions and advertising revenue. The use of ad-blocking software hurts the site. Please disable ad-blocking software or set an exception for MSFN. Alternatively, register and become a site sponsor/subscriber and ads will be disabled automatically. 


Sign in to follow this  
NoNameNeeded

Reg Binary to string value ?

Recommended Posts

I have an application which saves its toolbar settings as a "Standard" registry setting as a binary value in Win98.

In Win95 though, this "Standard" setting is a string value (by default) so copying a reg file from Win95 to Win98 won't help because it leaves the "standard" setting blank...

So I thought about converting this binary hex value (even though I thought hex isn't the same as binary but whatever...) with a tool and then manually pasting it into the "Standard" string in Win95 but either these tools don't work correctly or it's not possible to do what I'm trying to do.

I found these tools:
https://www.raymond.cc/blog/convert-windows-registry-hex-to-text/

The first one doesn't work at all, the second and the third one convert the hex/binary numbers to some gibberish which doesn't seem to work, because the application throws an error message when I try to start it with the new registry settings...

 

P.S: In English versions of Windows it's called "Default" setting, so that's what I was referring to when I wrote "Standard".

 

Edited by NoNameNeeded

Share this post


Link to post
Share on other sites

The issue may be with the "data type".

The Registry is a database (actually more similar to a filesystem than anything else) and eache "entry" (or field) can be of one among many data types, you can as well imagine that it is a fileststem where files have a (meaningful) extension AND (like Windows is now by default) you look at it in Explorer without showing extension, 9x has a subset of these:

https://msdn.microsoft.com/en-us/library/windows/desktop/bb773476(v=vs.85).aspx

If the data type doesn't match, the value will be "gibberish" or not found by the program/whatever.

jaclaz


 

Share this post


Link to post
Share on other sites

So it's not possible?

But I found something else that I find rather strange: Normally you only have String values as "Default" settings in Win98 but sometimes these values can become binary/hex values. How is this even possible and why isn't it possible in Win95?

And I'm not talking about user-defined settings because I'm aware that you can normally choose which kind of value you want to enter but I'm talking about this "Default" setting (called "Standard" in German versions) which normally can't be changed by the user (you can only change the value but not the type)

ScreenShot 515.jpg

ScreenShot 514.jpg

Edited by NoNameNeeded

Share this post


Link to post
Share on other sites

In your view/tool there is no indication if it is a REG_SZ, REG_SZ when you right click on the key should provide both "change value" and "change binary value" (have not a Win9x handy to check).

jaclaz


 

Edited by jaclaz

Share this post


Link to post
Share on other sites

It just didn't work.

It almost seemed as if it worked but it didn't want to apply the new reg binary default setting.

I think it's a restriction of Win95, it just won't let you have any other type than reg sz for the default setting.

Oh well, at least I have a registry editor with bookmarks now.

(y)

Share this post


Link to post
Share on other sites

But the "Standard" or "Default" is normally a REG_SZ, also on NT/2K/XP etc.

BUT a REG_SZ file can contain both a "string" and a "hex string" AFAIK, while remaining "REG_SZ".

So either the Windows 98 is not REG_SZ (and the windows 95 is REG_SZ) or the issue is something else.

With Registrar Lite (that should show the field type) are the "standard" different types in 95 when compared to 98? :dubbio:

Mind you it is well possible that Windows 95 simply cannot "understand" those values, but the REG_SZ type should have had no changes from 95 to 98.

jaclaz

 

Edited by jaclaz

Share this post


Link to post
Share on other sites

MSDN -> RegSetValueEx:

Quote

lpValueName
Pointer to a string containing the name of the value to set. If a value with this name is not already present in the key, the function adds it to the key.
If lpValueName is NULL or an empty string, "", the function sets the type and data for the key's unnamed or default value.

Windows 95 and Windows 98: On Windows 95, the type of a key's default value is always REG_SZ, so the dwType parameter must specify REG_SZ for an unnamed value. On Windows 98, an unnamed value can be of any type.

Windows NT: Registry keys do not have default values, but they can have one unnamed value, which can be of any type.

Share this post


Link to post
Share on other sites

@ABCDEFG

Thanks :), though it doesn't seem to be meaningful for or connected to the issue at hand. :dubbio:

jaclaz
 

Share this post


Link to post
Share on other sites

I think it is. It's just the official explanation why you can't change it on Win95.

Even though these "default" settings are REG_SZ types on all versions of Windows, they can be changed to other types on all Windows versions except for Win95. On Win95 it can only be a REG_SZ type. Even with Registrar which allows you to change it, you can't apply this new type to the default setting.

It's a pity that this application saves its toolbar settings as "default" setting because any other setting could be of any type.

Share this post


Link to post
Share on other sites

We are somehow not communicating.

I have no win9x handy, but on NT based systems the "default" IS a REG_SZ, AND it can have either a "string" or a "hex string" as value, still remaining REG_SZ.

It is about a SINGLE type (REG_SZ), NOT about different data types, but of course unless you check and report we are running circles.

Can you please try using Registrar Lite (provided that it shows data type on both Windows 95 and 98) and post the two screenshots showing the data type?

Of course if the program changes the data type on Windows 98, that is the reason why it won't work on Windows 95.

jaclaz
 

Share this post


Link to post
Share on other sites

I'm not entirely sure if I understand what you mean.

But yes, on all Windows versions except for Win95, the default type of REG_SZ can be changed to another type (at least with a registry editor like Registrar) which is exactly what this application does.

It changes the type of the defauilt value from REG_SZ to REG to REG_BINARY, which Win95 won't allow me (or an application) to do.

ScreenShot 516.jpg

ScreenShot 517.jpg

Share this post


Link to post
Share on other sites

Yep, now it is clear, it is the program that attempts to change the type of the field.

I will show you what I meant (checking now the Registrar Lite is not suitable, but maybe some other tool exists).

 
 

testreg.jpeg

Share this post


Link to post
Share on other sites

I see.

It still stays a REG_SZ type of value but it's also a hexadecimal value...

Well, at least with with Registrar Lite that's not possible.

And I kinda doubt that Win95 would accept that.

And even if it did, I think that the application might not be able use that setting because it expects a REG_BINARY type of value.

I could be wrong but we'll never find out...;)

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Sign in to follow this  

  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...