Jump to content

Reg Binary to string value ?


NoNameNeeded

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
Link to comment
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


 

Link to comment
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
Link to comment
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
Link to comment
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)

Link to comment
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
Link to comment
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.

Link to comment
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.

Link to comment
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
 

Link to comment
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

Link to comment
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

Link to comment
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...;)

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...