Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6336123
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T18:59:19+00:00 2026-05-24T18:59:19+00:00

I am setting a registry key with invalid value (setting a REG_DWORD key value

  • 0

I am setting a registry key with invalid value (setting a REG_DWORD key value with a REG_SZ). Will registry hold the value which it was having it before or will it reset it to its default value?

For example. I have set REG_DWORD key and have set it to value ‘4’. Default value of this key is ‘2’. Now when i try to set this key with api ‘RegSetValueEx(…)’ with an invalid REG_SZ value. Set was success. Now if i get this key value, will that be a default value ‘2’ or will it be previous set value ‘4’??

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-24T18:59:19+00:00Added an answer on May 24, 2026 at 6:59 pm

    RegSetValueEx Sets the data and type of a specified value under a registry key.

    It will just change the type of the stored value to REG_SZ and set the value you specified, it doesn’t check what value or type there were before. So when you read the value you’ll get the last value you set there. There’s no such thing as ‘invalid’ REG_SZ.

    Also forget about ‘default value for the key’. It’s not what you think it is. This is not the value that the API will return if something fails, it’s just a fancy name for an anonymous value.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am trying to get a value which i had set on registry key
I have an application which tries to load some expected registry settings within its
I exported a binary (REG_BINARY) registry value from my computer (IE setting). I need
Setting the scene: My asp.net web application carries a version number which is incremented
Inno Setup lets you set environment variables via the [Registry] sections (by setting registry
I have a batch script that checks if a registry key exists and if
I want to edit key HKEY_LOCAL_MACHINE\Software\company name\game name\settings\value to 1 (DWORD) This is my
so I made a program that creates a registry key on the pc, that
I want to assert that a certain registry value exists after installation, so I
I have the following values in my registry key: HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Internet Settings\Accepted Documents\ values: *

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.