Win32 |
Author |
Message |
delovski
Joined: 14 Jun 2006 Posts: 3524 Location: Zagreb
|
|
Back to top |
|
|
delovski
Joined: 14 Jun 2006 Posts: 3524 Location: Zagreb
|
Posted: Sat Oct 14, 2006 4:08 pm Post subject: |
|
|
C Board: RegSaveKey And Identical Keys
"I am trying to create a copy of registry keys without using RegSaveKey.
Part of it is a learning excercise, and the other part of it is wanting to develop
a registry copying mechanism that does not overwrite the existing data
upon restoration (like RegRestoreKey does).
As far as I can tell my copy mechanism is working right. Value data, subkey
data, and security descriptor data seems to be an identical match when I
compare a copied key to it's original. However, when I attempt to save the
copied key using RegSaveKey and compare it to the original key saved
with RegSaveKey, a binary comparison of the file shows differences." |
|
Back to top |
|
|
XNote Kapetan
Joined: 16 Jun 2006 Posts: 532
|
Posted: Sat Oct 14, 2006 5:30 pm Post subject: |
|
|
MSDN: RegSaveKey
Saves the specified key and all of its subkeys and values to a new file,
in the standard format.
Code: | LONG RegSaveKey(
HKEY hKey,
LPCTSTR lpFile,
LPSECURITY_ATTRIBUTES lpSecurityAttributes
); |
If hKey represents a key on a remote computer, the path described by
lpFile is relative to the remote computer.
RegSaveKey is often used in conjunction with RegRestoreKey to copy
subtrees in the registry. An alternative to this approach is to use the
SHCopyKey function.
The calling process must have the SE_BACKUP_NAME privilege enabled. |
|
Back to top |
|
|
delovski
Joined: 14 Jun 2006 Posts: 3524 Location: Zagreb
|
Posted: Fri Nov 17, 2006 8:55 pm Post subject: |
|
|
Shell Revealed: Default Programs: How do you unassociate a file extension in Vista?
"Our guidance for uninstall is not to worry about the HKCU per user default
as windows makes sure to broker it correctly. However, when uninstalling,
your app should restore the HKLM value to what it was before it took over.
Your app should do this by recording what the default was before it takes
over the machine default and using the recorded value on uninstall to restore
the system. This method does have some flaws though." |
|
Back to top |
|
|
delovski
Joined: 14 Jun 2006 Posts: 3524 Location: Zagreb
|
Posted: Sat Dec 02, 2006 8:39 pm Post subject: |
|
|
Two really useful Registry tips by Raymod Chen:
1. Beware of non-null-terminated registry strings.
"Lots of people lie about their registry data. You'll find lots of things that should be REG_DWORD
stored as a four-byte REG_BINARY. (This is in part a holdover from Windows 95's registry,
which didn't support REG_DWORD.)
One of the most insidious lies is to lie about the length of a string you're writing to the registry.
This has security implications. If your program assumes that strings in the registry are
always null-terminated, then you can be tricked into a buffer overflow if you happen across a
non-null-terminated string."
2. Why does Add or Remove Programs show a large blank space?
"If you go to the registry key HKLM\Software\Microsoft\Windows\CurrentVersion\Uninstall,
you'll find a list of programs that have registered for appearing in the Add or Remove Programs
control panel. Some of them might have been so kind as to provide a "DisplayIcon" value,
thereby saving the control panel the indignity of having to guess at an appropriate icon.
Unfortunately, if they put a bad icon registration in that registry value, the result is a bunch of
blank space since the control panel is trying to reserve space for a bogus icon." |
|
Back to top |
|
|
delovski
Joined: 14 Jun 2006 Posts: 3524 Location: Zagreb
|
Posted: Wed Dec 06, 2006 6:14 pm Post subject: |
|
|
CodeGuru: An AES Encrypting Registry Class,
by Jeffrey Walton
"The CAESEncRegKey class addresses the occasional problem of securely
saving data to the Registry. This article presents Yet Another Registry Class
that uses AES to encrypt data." |
|
Back to top |
|
|
Ike Kapetan
Joined: 17 Jun 2006 Posts: 3136 Location: Europe
|
Posted: Fri Mar 02, 2007 5:40 pm Post subject: |
|
|
Raymond Chen: The .Default user is not the default user
"Unfortunately, the name .Default has led people to believe that this user's
settings are the basis for new user profiles. In retrospect, calling it .Default
was probably a bad decision." |
|
Back to top |
|
|
delovski
Joined: 14 Jun 2006 Posts: 3524 Location: Zagreb
|
|
Back to top |
|
|
XNote Kapetan
Joined: 16 Jun 2006 Posts: 532
|
Posted: Thu Sep 27, 2007 5:42 pm Post subject: |
|
|
Remove "Shortcut" Text From New Shortcuts in Vista
"A source of annoyance for many Windows users is the " - Shortcut" text
that is added to the name of newly created shortcuts, and every time you
have to manually edit the shortcut and remove that text. Wouldn't it be
great if there was a registry hack for this?" |
|
Back to top |
|
|
Ike Kapetan
Joined: 17 Jun 2006 Posts: 3136 Location: Europe
|
Posted: Thu Jan 17, 2008 4:39 pm Post subject: |
|
|
RC: How did registry keys work in 16-bit Windows?
"Back in 16-bit Windows, the registry was a very different beast. Originally,
the only registry hive was HKEY_CLASSES_ROOT, and the only things it was
used for were COM object registration and file type registration." |
|
Back to top |
|
|
delovski
Joined: 14 Jun 2006 Posts: 3524 Location: Zagreb
|
Posted: Sat Jan 19, 2008 1:41 pm Post subject: |
|
|
OldNewThing: Why do registry keys have a default value?
> The whole registry nomenclature is a bit confusing, because a "key" has
> multiple "values", and each "value" has an associated name and value.
> (Except for the default value, which is not named.) So to get a setting
> out of the registry you have to get the "value value."
(Yes, I know, backwards compatibility forces your hand, like in everything.)
[The correct term for the contents of a value is data, so it's not "value value"
but rather "value data". Not that it helps much. -Raymond] |
|
Back to top |
|
|
delovski
Joined: 14 Jun 2006 Posts: 3524 Location: Zagreb
|
Posted: Fri Feb 19, 2010 1:09 am Post subject: |
|
|
Richard WM Jones - Why the Windows Registry sucks … technically
"It’s quite popular to bash the Windows Registry in non-technical or lightly
technical terms. I’ve just spent a couple of weeks reverse engineering the
binary format completely for our hivex library and shell which now suppo-
rts both reading and writing to the registry. So now I can tell you why the
Registry sucks from a technical point of view too." |
|
Back to top |
|
|
|