#81956 - 2002-06-22 06:40 AM
Registry
|
Les
KiX Master
Registered: 2001-06-11
Posts: 12734
Loc: fortfrances.on.ca
|
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
Permissions
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.
HKEY_CLASSES_ROOT
HKEY_LOCAL_MACHINE
HKEY_USERS
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.
|
Top
|
|
|
|
#81958 - 2004-06-30 02:48 PM
Re: Registry
|
Kdyer
KiX Supporter
Registered: 2001-01-03
Posts: 6241
Loc: Tigard, OR
|
|
Top
|
|
|
|
#81959 - 2005-03-20 10:04 AM
Re: Registry
|
NTDOC
Administrator
Registered: 2000-07-28
Posts: 11624
Loc: CA
|
|
Top
|
|
|
|
Moderator: Jochen, Radimus, Glenn Barnas, Allen, Arend_, ShaneEP, Mart
|
0 registered
and 920 anonymous users online.
|
|
|