Microsoft Windows Vista Community Forums - Vistaheads
Recommended Download



Welcome to the Microsoft Windows Vista Community Forums - Vistaheads, YOUR Largest Resource for Windows Vista related information.

You are currently viewing our boards as a guest which gives you limited access to view most discussions and access our other features. By joining our free community you will have access to post topics, communicate privately with other members (PM), respond to polls, upload content and access many other special features. Registration is fast, simple and absolutely free so , join our community today!

If you have any problems with the registration process or your account login, please contact us.

Driver Scanner

What is Windows registry (Registry Keys)

microsoft.public.it.windows.vista






Speedup My PC
Reply
  #1 (permalink)  
Old 03-28-2008
Omar Abid
 

Posts: n/a
What is Windows registry (Registry Keys)
Find this tutorial and more on http://thedotnetsource.blogspot.com
Reason of this project:
I wrote this tutorial in order to help the hundred of programmers
searching on the web for Windows registry.
This is an like introduction, if you are seeking how to use and deploy
the registry keys with Vb.net, just see the next tutorial (It'll be
tutorial 6).
In this tutorial I'll show what is the windows registry system and why
use it.

Project details:
1- What is Windows registry and why use it
2- How to read, write and change the registry
3- HIVES and their use
4- Definition of registry values

1- What is Windows registry and why use it.

You can compare the Windows registry to a database. It stores
informations related to Windows and other installed application on
your system, but also Hardware.
Think now if someone need to change the computer name via programming.
How can he do this?
Programmers can think of files (text files) to store the computer and
windows information. But when file get big and heavy, Database will be
more secure. And then they had (Windows builder) the choice of a
database "Windows Registry".
Microsoft Dot Net Frame 1.1 and higher have implemented a great
solution for registry on their classes. This will replace the hard
work and long lines of code that programmers have to write if they are
using Visual Studio 6.0 for example.

2- How to read, write and change the registry

Windows has a wonderful tool on it, named "Registry Editor". But you
won't find it, unless you open the System32 folder on the Windows
folder.
But we can easily run it through the execute command it the start
menu. Just type "regedit" (without quotes).
Now the registry editor will open.
Please before doing any changes on your registry make a backup.
To do a windows registry backup: File > Export > Give a name for the
file and select the All option box.
The backup may block your pc from working for a short period of time.
You'll see that there are 5 folder. Those are the main folder (named
hives) and you can't add another main folder.
Now you can select any folder and right click on it, then add a new
sub-folder or value.
By selecting any folder and right clicking, you'll find a list of
action that you can do.
If the action is blended (made not selectable), then either it's
impossible or you don't have the rights to do this action.
You need administrator rights to change registry keys.

3- HIVES (main registry folders) and their use

The registry is split into a number of logical sections named "hives",
those are the top main folder that can added, edited or renamed.
They all start with "HKEY" prefix.

HKEY_CLASSES_ROOT
Stores information about registered applications, such as Associations
from File Extensions and OLE Object Class ID's tying them to the
applications used to handle these items.
HKEY_CURRENT_USER
Stores settings that are specific to the currently logged-in user. The
HKCU key is a link to the subkey of HKEY_USERS that corresponds to the
user; the same information is reflected in both locations. On Windows-
NT based systems, each users' settings are stored in their own files
called NTUSER.DAT and USRCLASS.DAT inside their own documents and
settings subfolder.
HKEY_LOCAL_MACHINE
Abbreviated HKLM, HKEY_LOCAL_MACHINE stores settings that are general
to all users on the computer. On NT-based versions of Windows, HKLM
contains four subkeys, SAM, SECURITY, SOFTWARE and SYSTEM, that are
found within their respective files located in the %SystemRoot%
\System32\Config folder. A fifth subkey, HARDWARE, is volatile and is
created dynamically, and as such is not stored in a file. Information
about system hardware drivers and services are located under the
SYSTEM subkey, whilst the SOFTWARE subkey contains software and
windows settings.
HKEY_USERS
Contains subkeys corresponding to the HKEY_CURRENT_USER keys for each
user registered on the machine.
HKEY_CURRENT_CONFIG
Contains information gathered at runtime; information stored in this
key is not permanently stored on disk, but rather regenerated at boot
time.

4- Definition of registry values

Binary Value
REG_BINARY
Raw binary data. Most hardware component information is stored as
binary data and is displayed in Registry Editor in hexadecimal
format.
DWORD Value
REG_DWORD
Data represented by a number that is 4 bytes long (a 32-bit integer).
Many parameters for device drivers and services are this type and are
displayed in Registry Editor in binary, hexadecimal, or decimal
format. Related values are DWORD_LITTLE_ENDIAN (least significant byte
is at the lowest address) and REG_DWORD_BIG_ENDIAN (least significant
byte is at the highest address).
Expandable String Value
REG_EXPAND_SZ
A variable-length data string. This data type includes variables that
are resolved when a program or service uses the data.
Multi-String Value
REG_MULTI_SZ
A multiple string. Values that contain lists or multiple values in a
form that people can read are generally this type. Entries are
separated by spaces, commas, or other marks.
String Value
REG_SZ
A fixed-length text string.
Binary Value
REG_RESOURCE_LIST
A series of nested arrays that is designed to store a resource list
that is used by a hardware device driver or one of the physical
devices it controls. This data is detected and written in the
\ResourceMap tree by the system and is displayed in Registry Editor in
hexadecimal format as a Binary Value.
Binary Value
REG_RESOURCE_REQUIREMENTS_LIST
A series of nested arrays that is designed to store a device driver's
list of possible hardware resources the driver or one of the physical
devices it controls can use. The system writes a subset of this list
in the \ResourceMap tree. This data is detected by the system and is
displayed in Registry Editor in hexadecimal format as a Binary Value.
Binary Value
REG_FULL_RESOURCE_DESCRIPTOR
A series of nested arrays that is designed to store a resource list
that is used by a physical hardware device. This data is detected and
written in the \HardwareDescription tree by the system and is
displayed in Registry Editor in hexadecimal format as a Binary Value.
None
REG_NONE
Data without any particular type. This data is written to the registry
by the system or applications and is displayed in Registry Editor in
hexadecimal format as a Binary Value
Link
REG_LINK
A Unicode string naming a symbolic link.
QWORD Value
REG_QWORD
Data represented by a number that is a 64-bit integer. This data is
displayed in Registry Editor as a Binary Value and was introduced in
Windows 2000.

This tutorial doesn't contain any source.
See http://thedotnetsource.blogspot.com for the latest tutorials and
updates.

The Zip file contains:
-The readme.txt file
-The tutorial.txt file

Still have question:
Go to our blog (http://thedotnetsource.blogspot.com). Select the
tutorial post. Post a comment describing your problem.
Reply With Quote
Sponsored Links
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
What is Windows registry (Registry Keys) Omar Abid microsoft.public.windows.vista.general 0 03-28-2008 17:25
Unable to delete registry keys Art microsoft.public.windows.vista.general 2 12-04-2007 23:10
Removing Protected Registry Keys =?Utf-8?B?bXBvdHRlcg==?= microsoft.public.windows.vista.general 5 03-01-2007 12:25
Vista Registry Keys edde microsoft.public.windows.vista.general 3 02-19-2007 20:39




All times are GMT +1. The time now is 09:11.




Driver Scanner - Free Scan Now

Vistaheads.com is part of the Heads Network. See also XPHeads.com , Win7Heads.com and Win8Heads.com.


Design by Vjacheslav Trushkin for phpBBStyles.com.
Powered by vBulletin® Version 3.6.7
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.6.0 RC 2

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120