user1689131
user1689131

Reputation: 21

Confused over Registry entries

I'm having trouble remembering which is which when it comes to Registry settings - 00000000 is false and 00000001 is true?

So if I have:

[HKEY_CURRENT_USER\Software\Policies\Microsoft\Internet Explorer\Restrictions] "NoPrinting"=dword:00000000

That means "NoPrinting" is false and therefore printing is allowed?

And therefore:

[HKEY_CURRENT_USER\Software\Policies\Microsoft\Internet Explorer\Restrictions] "NoHelpMenu"=dword:00000001

Means "NoHelpMenu" is true, therefore there will be no Help Menu available to the user?

The "Nos" combined with the on/off (true/false) gets a little confusing.

Thank you.

Upvotes: 2

Views: 29276

Answers (2)

rizalp1
rizalp1

Reputation: 6524

You are correct. Usually 1 is true and 0 is false. However, this depends on how the application is implemented.

for instance, the code could be doing this:

if ( Registry.GetValue(myreg) == 1 ) { do something; } else { do something else; }

You can see how easy it is to swap this code and change the behavior.

To accurately conclude what means what, refer to the MSDN/Product specifications. For some of the registries you pointed, read it in the MSDN link here:

http://support.microsoft.com/kb/823057?wa=wsignin1.0

Upvotes: 1

David W
David W

Reputation: 10184

In reality, the context depends upon the application calling the registry entry. As far as the registry is concerned, its just a DWORD. You could make 2,124,450 mean true if you wanted it. In general, however, my observation is that 1 is generally taken to be a "true" value, and 0 for "false."

And I agree, the "NoSomethingSomething" options are insane-making. Those folks should be sentenced to ten years of listening to Slim Whitman albums.

Upvotes: 3

Related Questions