NAME

virt-win-reg - Display Windows Registry entries from a Windows guest


SYNOPSIS

 virt-win-reg [--options] domname '\Path\To\Subkey' name ['\Path'...]
 virt-win-reg [--options] domname '\Path\To\Subkey' @ ['\Path'...]
 virt-win-reg [--options] domname '\Path\To\Subkey' ['\Path'...]
 virt-win-reg [--options] disk.img [...] '\Path\To\Subkey' (name|@)


DESCRIPTION

This program can display Windows Registry entries from a Windows guest.

The first parameter is the libvirt guest name or the raw disk image of the Windows guest.

Then follow one or more sets of path specifiers. The path must begin with a \ (backslash) character, and may be something like '\HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion'.

The next parameter after that is either a value name, the single at-character @, or missing.

If it's a value name, then we print the data associated with that value. If it's @, then we print the default data associated with the subkey. If it's missing, then we print all the data associated with the subkey.

If this is confusing, look at the EXAMPLES section below.

Usually you should use single quotes to protect backslashes in the path from the shell.

Paths and value names are case-insensitive.

SUPPORTED SYSTEMS

The program currently supports Windows NT-derived guests starting with Windows XP through to at least Windows 7.

Registry support is done for \HKEY_LOCAL_MACHINE\SAM, \HKEY_LOCAL_MACHINE\SECURITY, \HKEY_LOCAL_MACHINE\SOFTWARE, \HKEY_LOCAL_MACHINE\SYSTEM and \HKEY_USERS\.DEFAULT.

\HKEY_USERS\$SID and \HKEY_CURRENT_USER are not supported at this time.

NOTES

This program is only meant for simple access to the registry. If you want to do complicated things with the registry, we suggest you download the Registry hive files from the guest using libguestfs(3) or guestfish(1) and access them locally, eg. using hivex(3), hivexml(1) or reged(1).


EXAMPLES

 $ virt-win-reg MyWinGuest \
   '\HKEY_LOCAL_MACHINE\Software\Microsoft\Windows NT\CurrentVersion' \
   ProductName
 Microsoft Windows Server 2003
 $ virt-win-reg MyWinGuest \
   '\HKEY_LOCAL_MACHINE\System\ControlSet001\Control' SystemBootDevice
 multi(0)disk(0)rdisk(0)partition(1)
 $ virt-win-reg MyWinGuest \
   '\HKEY_LOCAL_MACHINE\System\ControlSet001\Control'
 "CurrentUser"="USERNAME"
 "WaitToKillServiceTimeout"="20000"
 "SystemStartOptions"="NOEXECUTE=OPTOUT  FASTDETECT"
 "SystemBootDevice"="multi(0)disk(0)rdisk(0)partition(1)"

(please suggest some more)


OPTIONS

--help

Display brief help.

--version

Display version number and exit.

--connect URI | -c URI

If using libvirt, connect to the given URI. If omitted, then we connect to the default libvirt hypervisor.

If you specify guest block devices directly, then libvirt is not used at all.


SEE ALSO

hivex(3), hivexget(1), hivexsh(1), guestfs(3), guestfish(1), virt-cat(1), the Sys::Guestfs(3) manpage, the Sys::Guestfs::Lib(3) manpage, the Sys::Virt(3) manpage, http://libguestfs.org/.


AUTHOR

Richard W.M. Jones http://et.redhat.com/~rjones/


COPYRIGHT

Copyright (C) 2009 Red Hat Inc.

This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.