Discussion:
Changing the value of a existing registry key
(too old to reply)
T
2020-01-06 01:34:23 UTC
Permalink
Hi All,

I want to be able to change the value of certain registry keys. Is this
the right function:

https://docs.microsoft.com/en-us/windows/win32/api/winreg/nf-winreg-regsavekeyexw

If so, what "flags" would you use for universal use with
W7 up to W10?

Many thanks,
-T


REG_STANDARD_FORMAT
1

The key or hive is saved in standard format. The standard format is the
only format supported by Windows 2000.

REG_LATEST_FORMAT
2

The key or hive is saved in the latest format. The latest format is
supported starting with Windows XP. After the key or hive is saved in
this format, it cannot be loaded on an earlier system.

REG_NO_COMPRESSION
4

The hive is saved with no compression, for faster save operations. The
hKey parameter must specify the root of a hive under HKEY_LOCAL_MACHINE
or HKEY_USERS. For example, HKLM\SOFTWARE is the root of a hive.
Apd
2020-01-06 02:07:25 UTC
Permalink
Post by T
I want to be able to change the value of certain registry keys. Is this
https://docs.microsoft.com/en-us/windows/win32/api/winreg/nf-winreg-regsavekeyexw
No. That saves to a file. Use RegCreateKey or RegOpenKey and then
RegSetValue (or the *Ex versions of those).
T
2020-01-06 04:42:16 UTC
Permalink
Post by Apd
Post by T
I want to be able to change the value of certain registry keys. Is this
https://docs.microsoft.com/en-us/windows/win32/api/winreg/nf-winreg-regsavekeyexw
No. That saves to a file. Use RegCreateKey or RegOpenKey and then
RegSetValue (or the *Ex versions of those).
Thank you!

https://docs.microsoft.com/en-us/windows/win32/api/winreg/nf-winreg-regsetkeyvaluew
Apd
2020-01-06 11:20:11 UTC
Permalink
Post by T
Post by Apd
Post by T
I want to be able to change the value of certain registry keys. Is this
https://docs.microsoft.com/en-us/windows/win32/api/winreg/nf-winreg-regsavekeyexw
No. That saves to a file. Use RegCreateKey or RegOpenKey and then
RegSetValue (or the *Ex versions of those).
Thank you!
https://docs.microsoft.com/en-us/windows/win32/api/winreg/nf-winreg-regsetkeyvaluew
That's a newer function introduced with Vista. See also the original
RegSetValueExW. There are subtle differences.

Loading...