Page 1 of 1 1
Topic Options
#81956 - 2002-06-22 06:40 AM Registry
Les Offline
KiX Master

Registered: 2001-06-11
Posts: 12734
The registry holds the key (pun intended) to the workings of Windows. Modifications can dramatically change the behavior of Windows.

Improper mods can cause Windows to fail miserably. Registry edits are kinda like brain surgery. You had best know what you're doing. The usual disclaimer should not be taken lightly.

IMPORTANT : This article contains information about modifying the registry. Before you modify the registry, make sure to back it up and make sure that you understand how to restore the registry if a problem occurs. For information about how to back up, restore, and edit the registry, click the following article number to view the article in the Microsoft Knowledge Base:
256986 Description of the Microsoft Windows Registry

I find that a great many people confuse the terms "Key" and "Value". A key is like a folder and a value is like a file. In RegEdit, the keys appear in the left pane and are represented as manilla folders. The values appear in the right pane as paper scraps.

With reference to values, there are value names and value data. Think of the value name as a filename and value data as a file's contents. Ruud, in the manual, refers to the value name as "Entry" and the value data simply as "data".

KiX has a good compliment of functions for reading from and writing to the registry. I will not go over all of them because the manual already does a good job of it. I will however, touch upon a few points.

See the following FAQs

Topic: LOADKEY - Why doesn't it work?

Topic: Sequence of events during logon

Insufficient permissions are probably the greatest obstacle to reg mods from a logon script. Often one has to get creative to overcome the perms issue. the most popular work-around is to proxy the requests to an admin script. the admin script can be task scheduled, run with SU, or run on a remote machine under an admin user. Yes dear, KiX can access a registry remotely.

All the above cause some grief when trying to manipulate HKEY_CURRENT_USER. You see, HKCU is just "smoke and mirrors" of the hive HKEY_USERS\@SID. If you don't believe me, open a remote registry in RegEdit.
From RegEdit, under the Registry pull-down, click Connect Network Registry... and enter the computer name. You will see three hives.

Everything else that you'd normally see on a local registry is smoke and mirrors of these three hives. Now, the @SID macro is good at returning the current user's SID but when proxying to another script/user it is useless. What you need is a way to get the SID of the user. Enter the UDF, GetSID().

After all this, some things are best done by policy. Either via PolEdit for NT4 domains, Group Policy Objects (GPO) for AD, local (LGPO) for Win2k or through IEAK (Internet Explorer Administration Kit). These remove the burden of permissions and load order and also obfuscate the reg mods. Putting reg mods in the logon script for everyone to rip and then undo may be counter-productive.

Edited by kdyer (2004-06-30 03:00 PM)
Give a man a fish and he will be back for more. Slap him with a fish and he will go away forever.

#81957 - 2002-06-22 04:36 PM Re: Registry
Les Offline
KiX Master

Registered: 2001-06-11
Posts: 12734
More on Registry...

Load order must be factored when attempting to apply policies through reg hacks from within the logon script.  Policies are loaded before the logon script runs so reg hacks may not take effect until the next logon.  RunLogonScriptSync is another.  For that, see the FAQ:

Topic: W2k+ - Keep the Window visible on login?

If you want to see/manipulate registry permissions, then use RegEdt32.

If you want to export portions of the registry for later importation, both RegEdt32 and RegEdit will do it but in different formats.  RegEdt32 saves in binary format while RegEdit saves in ASCII (see note).  They are not interchangable.

Note: RegEdit for Win2k saves in unicode format and therefor is not compatible with older (Win9x) RegEdit.  That means that if you export a .REG file from Win2k, you will not be able to merge it into Win9x systems with RegEdit.

Tools and Resources

The Windows 2000 Professional Resource Kit includes a registry reference (regentry.chm) as well.  Also, a good understanding of how policies are applied in the registry can be had by taking apart the .ADM files.

<small>[ 22 June 2002, 17:25: Message edited by: LLigetfa ]</small>

Edited by kdyer (2004-06-30 03:02 PM)
Give a man a fish and he will be back for more. Slap him with a fish and he will go away forever.

#81958 - 2004-06-30 02:48 PM Re: Registry
Kdyer Offline
KiX Supporter

Registered: 2001-01-03
Posts: 6241
Loc: Tigard, OR
Renaming, working with, Registry Keys and values..

moving renaming and coping registry keys

Rename Registry Key

HOW TO: Add, Modify, or Delete Registry Subkeys and Values by Using a Registration Entries (.reg) File - Microsoft Tech Article

Edited by kdyer (2004-07-01 02:03 PM)
Utilize these resources:
UDFs (Full List)
KiXtart FAQ & How to's

#81959 - 2005-03-20 10:04 AM Re: Registry
NTDOC Administrator Offline

Registered: 2000-07-28
Posts: 11624
Loc: CA
Inside the Registry By Mark Russinovich

Windows 95 Registry Overview

Page 1 of 1 1

Moderator:  Jochen, Radimus, Glenn Barnas, Allen, Arend_, ShaneEP, Mart 
Hop to:
Shout Box

Who's Online
0 registered and 374 anonymous users online.
Newest Members
kvn317, kixtarts2025, SERoyalty, mytar, Gabriel
17871 Registered Users

Generated in 0.053 seconds in which 0.023 seconds were spent on a total of 12 queries. Zlib compression enabled.

Search the board with:
superb Board Search
or try with google: