Skip to content
windows registry hive extraction library. PLEASE DO NOT USE GITHUB FOR ISSUES OR PULL REQUESTS. See the website for how to file a bug or contact us.
OCaml C Perl M4 Makefile Shell Other
Branch: master
Clone or download
Type Name Latest commit message Commit time
Failed to load latest commit information.
.gnulib @ 34881af
extra-tests Fix shebang in perl scripts Oct 5, 2015
generator perl: fix format of croak for RLenValue Jan 16, 2019
html Add html/ directory, include POD CSS. Feb 19, 2010
lib lib: Reset errno to zero to avoid erroneously returning E2BIG Jan 22, 2019
m4 Update gnulib to latest. Jan 17, 2019
perl Win::Hivex::Regedit: Ignore comments Jan 16, 2020
python python: add heavier tests for setvalue Aug 18, 2014
ruby ruby: improve test functions Jan 17, 2019
sh build: do not ignore pod2man error codes Jul 14, 2017
xml build: do not ignore pod2man error codes Jul 14, 2017
.gitignore Ignore config.cache file. Feb 26, 2018
.x-sc_prohibit_magic_number_exit maint: use EXIT_SUCCESS and EXIT_FAILURE, not 0 and 1 to exit Feb 19, 2010
LICENSE Move README, LICENSE files to the toplevel directory. Feb 19, 2010
TODO maint: avoid using test's -a and -o operators; they are not portable Jun 28, 2011
bootstrap Add a cache for iconv_t handles to hive_t Feb 10, 2018 Support for Windows Registry. Feb 19, 2010 Quote contents of @var@ substitutions Sep 6, 2017


hivex - by Richard W.M. Jones,
Copyright (C) 2009-2010 Red Hat Inc.

This is a self-contained library for reading and writing Windows
Registry "hive" binary files.

Unlike many other tools in this area, it doesn't use the textual .REG
format for output, because parsing that is as much trouble as parsing
the original binary format.  Instead it makes the file available
through a C API, or there is a separate program to export the hive as

This library was derived from several sources:

 . NTREG registry reader/writer library by Petter Nordahl-Hagen
    (LGPL v2.1 licensed library and program)
 . dumphive (a BSD-licensed Pascal program by Markus Stephany)
 . editreg program from Samba - this program was removed in later
   versions of Samba, so you have to go back in the source repository
   to find it (GPLv2+)
 . reverse engineering the format (see lib/tools/

Like NTREG, this library only attempts to read Windows NT registry
files (ie. not Windows 3.1 or Windows 95/98/ME).  See the link above
for documentation on the older formats if you wish to read them.

Unlike NTREG, this code is much more careful about handling error
cases, corrupt and malicious registry files, and endianness.


The license for this library is LGPL v2.1, but not later versions.
For full details, see the file LICENSE in this directory.


To just build the library, the dependencies are quite minimal.  You
only need the following:

- An ISO C compiler.

- Perl tools 'pod2man' and 'pod2text'.

These dependencies are needed for the tools:

- Readline library (optional, to add command-line editing to hivexsh).

- libxml2 (optional, for hivexml).

If you want to make the generated files or change the API, then you
will need the OCaml interpreter (/usr/bin/ocaml).

To build the language bindings, you will need various extra packages.
See the configure output for more details.

Directories and tools


        Extra tests which need external test data.  See
        hivex-test-data on


	Generator used to write a lot of boilerplate code for
	header files, documentation, language bindings etc.
	The API for hivex is specified in the generator.


	Test hive files.  See images/README.


	The C library.


	OCaml, Perl, Python or Ruby bindings and tests.  The bindings
	are generated by 'generator/'.

        Python 2 or 3 is supported.  To select between them, set
        PYTHON to point to the Python interpreter you want to use, eg:

        ./configure PYTHON=/usr/bin/python3

        Regedit-like registry merging tool.


	Interactive shell.  This also contains the old 'hivexget'
	tool (originally written in C, now replaced by a hivexsh
	shell script).


	hivexml program which converts hive files to XML.
You can’t perform that action at this time.