reg.htm ( File view )

  • By 2010-07-31
  • View(s):8
  • Download(s):0
  • Point(s): 1
			<html>

<head>
<meta http-equiv="content-type" content="text/html; charset=gb2312">
<title>the </title>
<meta name="generator" content="microsoft frontpage 3.0">
</head>

<body background="../jpg/di1.JPG">

<p align="center"><font size="6" color="#0000ff">the .reg file format</font></p>
<div align="center"><center>

<table border="0" width="88%">
<tr>
<td width="100%"><br>
<br>
1 introduction<br>
the .reg file format is used by regedit, the program supplied with windows 3.x,<br>
windows 95, and windows nt, to import and export settings from the registry.<br>
note that i will not explain what the registry is, how it works, or what it can<br>
be used for. there are other documents describing the registry and it's most<br>
interesting parts all over the net - check out some of the links at the end of<br>
this document. also, i will not provide you with information on regedit for<br>
windows 3.x - i know that it exists, but not if it's format is in any way like<br>
the regedit of 95/nt. besides, the registry is much less interesting on windows<br>
3.x.<br>
<br>
2 description<br>
the file is formatted as plain ascii text. every line is ended with a cr/lf<br>
combination.<br>
<br>
2.1 header<br>
it starts with regeditx, where x is regedit's version number - on 95/nt, it's<br>
4, making the string regedit4.<br>
<br>
this is also the only part of the file actually checked by regedit when it's<br>
importing - if the file contains any formatting errors, regedit will not notify<br>
you and simply skip the settings that contain errors.<br>
<br>
in particular, regedit will pretty much accept anything as long as it starts<br>
with regeditx, and ignore anything erroneous. yes, that does add up to the<br>
microsoft stupid mistakes list.<br>
<br>
2.2 keys <br>
key names are exported as they are encountered, but need not be in any order.<br>
subkeys are explicitly named. for example, if you had the key<br>
hkey_classes_root\clsid and it's subkey<br>
hkey_classes_root\clsid\{
21ec2020-3aea-1069-a2dd-08002b30309d
} (which<br>
represents the classid of the control panel, by the way), they would be<br>
exported as:<br>
<br>
[hkey_classes_root\clsid]<br>
<br>
[hkey_classes_root\clsid\{
21ec2020-3aea-1069-a2dd-08002b30309d
}]<br>
<br>
for a key name to be valid, it must start with one of the root key names:<br>
hkey_classes_root, hkey_current_user, hkey_local_machine, hkey_users,<br>
hkey_current_config and hkey_dyn_data.<br>
<br>
a key name may only contain printable ascii characters (that is, characters<br>
with values from 32 through 127) and may not contain spaces, backslashes \ or<br>
the wildcards * and ?.<br>
<br>
every key name is followed by it's values, starting on the line directly<br>
following it. the list of values is terminated with an empty line, and may be<br>
empty itself. <br>
<br>
for example:<br>
[key-name]<br>
<br>
[second-key-name]<br>
&quot;value1&quot;=something<br>
&quot;value2&quot;=something<br>
<br>
[third-key-name]<br>
<br>
if a key is specified which does not exist, it is created, along with any<br>
parent keys that do not exist. for example, if the key<br>
hkey_users\jeroen\test\subkey is specified, and only the key hkey_users\jeroen<br>
exists, the key hkey_users\jeroen\test is also created.<br>
<br>
note that you cannot delete keys or values - you can only add them if they<br>
don't already exist, or modify them if they do.<br>
<br>
2.3 values<br>
there are three kinds of values in the registry: strings, binary values, and<br>
dwords. they represent a collection of characters, a collection of bytes, and a<br>
32-bit integer, respectively.<br>
<br>
values consist of a name, enclosed in quotes &quot;&quot;, followed by an equal sign = ,<br>
followed by the value value (there's no other way to put it).<br>
<br>
every key, even if created empty, contains at least one string value - this is<br>
the value shown as (default) in regedit. to set it's value, use @ as the value<br>
name, and omit the usual quotes around the value name.<br>
<br>
example:<br>
@=&quot;this is the default value.&quot;<br>
<br>
2.3.1 strings<br>
strings may be any size. they are represented within quotes &quot;&quot;, and contain<br>
normal ascii characters.<br>
<br>
the quote &quot; and backslash \ are also allowed in strings - however, they must be<br>
represented as \&quot; and \\, respectively. also, regedit can import and export all<br>
non-ascii characters except for linefeed (or newline, ascii code 10). should a<br>
linefeed end up in a string, regedit will export this as a real newline,<br>
splitting the string in two lines. when reimporting this string, regedit will<br>
only read the first line. the moral of the story: don't store linefeeds in<br>
strings.<br>
<br>
examples of strings:<br>
&quot;foo&quot;=&quot;bar&quot;<br>
&quot;foopath&quot;=&quot;c:\\windows\\system&quot;<br>
&quot;foomessage&quot;=&quot;this/nmessage/nactually/nconsists/nof/one/nlong/nline.&quot;<br>
<br>
2.3.2 binary values<br>
binary values are used where strings and dwords fail. they can be used to<br>
represent any type of data. they are represented as hex:xx,yy,zz where xx,yy<br>
and zz are hexadecimal representations of single bytes. they may be any length.<br>
<br>
lengthy binary values can be divided into multiple lines using the c line<br>
separator \. for example:<br>
&quot;bar&quot;=hex:48,00,00,00,01,00,00,00,0a,00,0a,00,0a,00,0a,00,0a,00,0a,00,0a,\<br>
00,0a,00,0a,00,0a,00,0a,00,0a,00,0a,00,0a,00,0a,00,0a,00,0a,00,0a,00,0a,00,\<br>
0a,00,0a,00,0a,00,0a,00,0a,00,0a,00,0a,00,0a,00,0a,00,00,00,00,00,c4,ac,01,\<br>
00<br>
<br>
also take note that this is only allowed with binary values. in particular, you<br>
cannot divide strings this way. and yes, this is pretty stupid.<br>
<br>
although i usually ignore microsoft, they recommend you shouldn't store more<br>
than around two kilobytes of binary data at most, and i agree with them for<br>
once.<br>
<br>
example of binary values:<br>
&quot;foo&quot;=hex:00,de,ca,de,12,34<br>
<br>
2.3.2.1 types of binary values<br>
along with 'regular' binary values, there are also some special types of data<br>
which regedit represents as special binary values, like this:<br>
<br>
&quot;foobar&quot;=hex(type):xx,xx,xx,xx,...<br>
<br>
where type is a number ranging from zero to ten in the current versions of<br>
windows, as follows:<br>
<br>
type name <br>
0 reg_none <br>
1 reg_sz <br>
2 reg_expand_sz<br>
3 reg_binary <br>
4 reg_dword, reg_dword_little_endian<br>
5 reg_dword_big_endian<br>
6 reg_link<br>
7 reg_multi_sz<br>
8 reg_resource_list<br>
9 reg_full_resource_descriptor <br>
10 reg_resource_requirements_list<br>
<br>
2.3.2.1.1 reg_none<br>
reg_none means 'no defined value type'. no, i don't know what it's good for -<br>
reg_binary is already a catch-all type for everything that has no type. perhaps<br>
it's used for values that have no contents, although i can't imagine what that<br>
would be good for.<br>
<br>
2.3.2.1.2 reg_sz<br>
a null-terminated string. this is the same as the string type, represented as<br>
bytes. for example, these definitions are equal:<br>
<br>
&quot;barfoo&quot;=hex(1):41,42,43,44,00<br>
and<br>
&quot;barfoo&quot;=&quot;abcd&quot;<br>
<br>
see also 2.3.1, strings.<br>
<br>
2.3.2.1.3 reg_expand_sz<br>
a null-terminated string that contains unexpanded references to environment<br>
variables. when an application reads this string from the registry, it can 
...
...
(Please download the complete source code to view)
			
...
Expand> <Close

Want complete source code? Download it here

Point(s): 1

Download
0 lines left, continue to read
Sponsored links

File list

Tips: You can preview the content of files by clicking file names^_^
Name Size Date
index.htm66.63 kB24-03-99|22:05
binary0.00 B27-01-04|20:12
arc.htm4.53 kB18-03-99|04:12
ARJ.htm8.27 kB18-03-99|04:12
cab.zip43.49 kB11-12-98|03:08
lzh.htm2.08 kB18-03-99|04:12
tar.htm12.38 kB18-03-99|04:12
comm0.00 B27-01-04|20:12
clarion.zip32.79 kB11-12-98|03:09
dbase.htm5.56 kB18-03-99|04:12
dbf.htm2.99 kB18-03-99|04:12
ntx.htm11.44 kB18-03-99|04:12
paradox.rtf61.50 kB29-01-99|17:09
wks.zip22.04 kB11-12-98|03:09
xls.txt44.32 kB29-01-99|17:30
data0.00 B27-01-04|20:12
ai30.pdf260.00 kB29-03-98|22:54
bmp.htm46.13 kB18-03-99|04:12
Bmp.html37.97 kB18-03-99|04:12
BW.htm2.71 kB18-03-99|04:12
col.htm2.02 kB18-03-99|04:12
draft-bo.rtf240.19 kB14-03-99|00:24
dwg_ff.htm11.31 kB18-03-99|04:12
dxf.htm86.74 kB18-03-99|04:12
dxf12.htm140.73 kB18-03-99|04:12
dxf13.zip143.43 kB11-12-98|02:44
dxf14htm.zip160.37 kB11-12-98|02:48
DXF_R14.HLP201.27 kB24-06-98|19:27
emf.hlp73.22 kB17-10-95|23:53
gif87.htm29.98 kB18-03-99|04:12
Gif89a.doc83.47 kB29-10-90|08:27
grap.htm14.76 kB18-03-99|04:12
Ico.zip114.21 kB27-01-99|19:13
jpg.pdf93.35 kB29-03-98|22:59
jpg.rtf15.97 kB23-01-99|01:36
lzw.htm6.44 kB18-03-99|04:12
lzwexp.htm17.13 kB18-03-99|04:12
PCD.htm5.46 kB18-03-99|04:12
pcx.htm26.13 kB18-03-99|04:12
pic.htm4.49 kB18-03-99|04:12
PSD.pdf368.64 kB18-04-97|19:01
ps_plug.pdf377.16 kB29-03-98|22:59
rle.pdf31.59 kB29-03-98|23:06
tga.htm45.46 kB18-03-99|04:12
tga2.zip54.38 kB10-12-98|19:48
tif.pdf365.72 kB29-03-98|23:07
YUV.htm3.96 kB18-03-99|04:12
graphics0.00 B27-01-04|20:12
agentref.zip11.06 kB11-12-98|03:18
bbs.htm12.85 kB18-03-99|04:12
bluewave.htm43.85 kB18-03-99|04:12
idx.htm3.68 kB18-03-99|04:12
url.htm1.61 kB18-03-99|04:12
uuencode.htm11.10 kB18-03-99|04:12
Vrml.rtf70.88 kB28-01-99|14:10
VRML2.hlp181.23 kB21-02-98|20:57
internet0.00 B27-01-04|20:12
jpg0.00 B27-01-04|20:12
escode.rtf49.26 kB08-02-99|21:53
Intel.rtf130.99 kB08-02-99|21:50
joystick.rtf14.53 kB08-02-99|21:57
keyboard.rtf14.81 kB08-02-99|21:59
mouse.rtf15.75 kB08-02-99|22:00
pcl5.zip92.62 kB13-12-98|04:33
speaker.rtf16.96 kB08-02-99|22:04
VGA.htm29.31 kB18-03-99|04:12
other0.00 B27-01-04|20:12
cd.htm26.36 kB18-03-99|04:12
cda.htm2.98 kB18-03-99|04:12
mid1.htm16.87 kB18-03-99|04:12
midi2.htm12.08 kB18-03-99|04:12
midi3.htm10.51 kB18-03-99|04:12
MIND1-2.htm7.09 kB18-03-99|04:12
MPEG.zip573.61 kB11-12-98|04:02
mpeg1.zip65.24 kB11-12-98|03:45
Wav.rtf30.08 kB25-01-99|00:30
wave.htm104.17 kB18-03-99|04:12
sound0.00 B27-01-04|20:12
adobe_EPSF1_2.pdf12.64 kB29-03-98|22:51
adobe_EPSF2_0.pdf42.59 kB29-03-98|22:51
adobe_EPSF3_0.pdf127.45 kB29-03-98|22:54
afont.htm9.14 kB18-03-99|04:12
font.htm17.99 kB18-03-99|04:12
rtf.rtf158.74 kB25-01-99|01:41
rtf.zip147.10 kB11-12-98|03:32
word60.rtf463.82 kB25-01-99|03:24
word8.htm532.04 kB18-03-99|04:12
Wordpf.htm3.29 kB18-03-99|04:12
wordst.htm51.88 kB18-03-99|04:12
wri.htm21.84 kB18-03-99|04:12
text0.00 B27-01-04|20:13
ani.htm3.05 kB18-03-99|04:12
Bmp.html33.82 kB18-03-99|04:12
cab.zip43.49 kB11-12-98|03:08
cal.htm5.64 kB18-03-99|04:12
clp.htm2.33 kB18-03-99|04:12
crd.htm4.59 kB18-03-99|04:12
find.htm4.38 kB18-03-99|04:12
grp.htm8.54 kB18-03-99|04:12
Hlp.htm57.27 kB18-03-99|04:12
Hpj.doc71.12 kB14-01-93|06:22
Ico.zip114.21 kB27-01-99|19:13
icons.htm28.52 kB18-03-99|04:12
inf.htm2.74 kB18-03-99|04:12
Lnk.htm5.24 kB18-03-99|04:12
LONG.htm3.15 kB18-03-99|04:12
reg.htm11.13 kB18-03-99|04:12
res32.htm16.18 kB18-03-99|04:12
rle.pdf31.59 kB29-03-98|23:06
rtfwr.htm8.10 kB18-03-99|04:12
scr.htm1.69 kB18-03-99|04:12
ttfspec1.zip752.40 kB28-01-99|12:00
ttfspec2.zip501.01 kB27-01-99|20:51
Wav.rtf30.08 kB25-01-99|00:30
wave.htm101.51 kB18-03-99|04:12
wavec.htm205.63 kB18-03-99|04:12
WinReg.htm22.02 kB18-03-99|04:12
wmf.htm11.82 kB18-03-99|04:12
wri.htm21.84 kB18-03-99|04:12
windows0.00 B27-01-04|20:13
FORMAT0.00 B27-01-04|20:12
文件格式大全0.00 B27-01-04|20:12
...
Sponsored links

reg.htm (4.88 MB)

Need 1 point
Your Point(s)

Your Point isn't enough.

Get point immediately by PayPal

More(Debit card / Credit card / PayPal Credit / Online Banking)

Submit your source codes. Get more point

LOGIN

Don't have an account? Register now
Need any help?
Mail to: support@codeforge.com

切换到中文版?

CodeForge Chinese Version
CodeForge English Version

Where are you going?

^_^"Oops ...

Sorry!This guy is mysterious, its blog hasn't been opened, try another, please!
OK

Warm tip!

CodeForge to FavoriteFavorite by Ctrl+D