Softpanorama

May the source be with you, but remember the KISS principle ;-)
Home Switchboard Unix Administration Red Hat TCP/IP Networks Neoliberalism Toxic Managers
(slightly skeptical) Educational society promoting "Back to basics" movement against IT overcomplexity and  bastardization of classic Unix

Reg.exe

News See also Recommended Links Recommended Papers Microsoft Registry Tools Commercial tools with trial period
Snapshots Backups Monitoring  Tweaking Humor Etc

Windows XP and Windows 7 has REG command line utility. This tool enables you to add, change, delete, search, backup, restore, and perform other operations on registry entries from the command prompt or a batch file. It also   can be used in scripts to do periodic snapshots of the registry.

Console Registry Tool for Windows - version 3.0
Copyright (C) Microsoft Corp. 1981-2001.  All rights reserved


REG Operation [Parameter List]

  Operation  [ QUERY   | ADD    | DELETE  | COPY    |
               SAVE    | LOAD   | UNLOAD  | RESTORE |
               COMPARE | EXPORT | IMPORT ]

Return Code: (Except of REG COMPARE)

  0 - Succussful
  1 - Failed

For help on a specific operation type:

  REG Operation /?

Examples:

  REG QUERY /?
  REG ADD /?
-- More  --

It has several subcommand

Subcommand Function
add Adds a new subkey or entry to the registry
delete Deletes a subkey or entries from the registry
query Displays the data in a subkey or a value
compare Compares specified registry subkeys or entries
copy Copies a subkey to another subkey.
save Saves a copy of specified subkeys, entries, and values of the registry in hive (binary) format
restore Writes saved subkeys and entries in hive format back to the registry
load Writes saved subkeys and entries in hive format back to a different subkey
unload Removes a section of the registry that was loaded using reg load
export Creates a copy of specified subkeys, entries, and values into a file in REG (text) format
import Merges a REG file containing exported registry subkeys, entries, and values into the registry

Microsoft utility reg.exe and some antispyware tools (for example HijackThis) can also provide a snapshot of important parts of the registry and as such are useful in a wider context. 

reg export HKLM\Software hklm_before.txt
--install program--
reg export HKLM\Software hklm_after.txt

Generally you need snapshort of all major keys to see the whole picture. See Registry snapshots


Top Visited
Switchboard
Latest
Past week
Past month

NEWS CONTENTS

Old News ;-)

Windows Registry Compare Snapshot & Uninstaller

Registry Watch monitors changes made in the Windows Registry and the file system. Registry Watch make two file system and Registry snapshots for comparison. It compares the Registry and the file system before the installation of a program to the Registry and file system after the installation is completed. You can elect to just compare the Registry or file system or both.

Since it is a full Windows snapshot utility, it can completely uninstall the program. Registry Watch is a 100% complete software uninstaller. It works on 64 bit as well as 32 bit.

Registry Watch can automatically backup your Windows Registry and restore it when you need to, on any Windows platform; from Windows 95 to Windows 2000, from Windows XP to Windows 7.

You can do either a system file snapshot or a Registry snapshot, or both; giving you more control. This not only allows you to use Registry Watch as an uninstaller, but also for finding changes made to your Registry for any other reason.

Registry Watch gives you the option of comparing the entire Registry or just a single Key. The comparison snapshots are for HKEY_USERS, HKEY_LOCAL_MACHINE, a single Key or the entire Registry. You may also choose to remove some of the changes from the report before saving it, so that these items will not be undone later. You can even take several comparison snapshots using the original snapshot. This will allow you to see what is changed in the Registry when installing a program, then see what other changes were made when running the program. Allowing you to see all the changes from the original snapshot.

Registry Watch will take you to the Registry Key you have selected in the report for viewing. Just click on "Go To Key". You can also send any line of the report to the Clipboard if you wish to copy and paste it.

REG Command in Windows XP

Querying keys

REG query allows you to query a single key for a single value, or a range of keys for all their values. This provides you with a quick way to check whether a key has the value you think it does, or in fact whether it has any values associated with it at all:

REG QUERY KeyName [/v ValueName | /ve] [/s]

Example:

C:\WINDOWS>reg query \\srv1\hklm\software\symantec ! REG.EXE VERSION 3.0
HKEY_LOCAL_MACHINE\software\symantec
HKEY_LOCAL_MACHINE\software\symantec\InstalledApps
HKEY_LOCAL_MACHINE\softwaresymantec\LiveUpdate
HKEY_LOCAL_MACHINE\software\symantec\NAVMSE
HKEY_LOCAL_MACHINE\software\symantec\Norton AntiVirus
HKEY_LOCAL_MACHINE\software\symantec\Norton AntiVirus NT
HKEY_LOCAL_MACHINE\software\symantec\Shared Technology
HKEY_LOCAL_MACHINE\software\symantec\SharedDefs
HKEY_LOCAL_MACHINE\software\symantec\SharedUsage
HKEY_LOCAL_MACHINE\software\symantec\Symevent

Managing the Windows Registry from the Command Prompt with Reg.exe

Managing the Windows Registry from the Command Prompt with Reg.exe

The command-line utility reg.exe is a powerful and versatile way to manage the Windows XP Registry. This article discusses Its features and application.

Many will be familiar with the graphical interface tool regedit.exe that is available for editing the Windows Registry. Less familiar, however, is the command-line utility reg.exe that also comes with Windows XP. This accessory will do anything that regedit.exe can do and has the additional facility of being directly usable in scripts. It is a common tool for system administrators with many computers to manage but can also be useful to the more experienced home PC user. I will discuss some aspects that may be of interest to this latter group. More details can be found at this Microsoft site. There is also information in the Windows XP Help and Support Center.

Registry editing is not for everybody but it is not as fearsome an operation as it is sometimes made out to be. Just be sure to follow the iron-clad rule to back up the Registry first before editing. There are many useful tweaks that involve a simple Registry edit and reg.exe provides a way that is simpler and safer in some ways than Regedit. It also provides a way to back up keys or entire hives of the Registry into files that can be stored off the main drive.

Like some other command-line utilities, the reg command is a shell or console that has its own set of sub-commands. An complete command will consist of reg subcommand variables Table I lists these subcommands and some are discussed in more detail in sections that follow. The commands can be carried out on remote networked computers as well as the local computer but I will confine the discussion to operations involving just the local computer.

Table I. Subcommands for reg.exe
Subcommand Function
add Adds a new subkey or entry to the registry
delete Deletes a subkey or entries from the registry
query Displays the data in a subkey or a value
compare Compares specified registry subkeys or entries
copy Copies a subkey to another subkey.
save Saves a copy of specified subkeys, entries, and values of the registry in hive (binary) format
restore Writes saved subkeys and entries in hive format back to the registry
load Writes saved subkeys and entries in hive format back to a different subkey
unload Removes a section of the registry that was loaded using reg load
export Creates a copy of specified subkeys, entries, and values into a file in REG (text) format
import Merges a REG file containing exported registry subkeys, entries, and values into the registry

Back to top

Reg add

This command is used to add keys and values to the Registry. The syntax is given by REG ADD KeyName [/v ValueName | /ve] [/t Type] [/s Separator] [/d Data] [/f] Table II explains the entries.

Table II. Parameters in REG ADD command
Parameter Description
KeyName Complete Registry key name. Uses abbreviations HKCR, HKCU, HKLM, and HKU for root keys
/v ValueName Adds or changes a value
/ve Changes a key's default value
/t Type The type of value: REG_BINARY, REG_DWORD, REG_SZ, REG_MULTI_SZ, etc. The default is REG_SZ
/s Separator Specifies the character used to separate strings in REG_MULTI_SZ entries. The default is /0
/d Data The data to assign to a value
/f Forces overwriting of existing values with prompting

Back to top

REG ADD provides a quick and simple method for adding new keys to the Registry or modifying old ones. As an example, let's look at how to add the sub- key "HackersAreUs" to the Local Machine Software key. The command would be REG ADD HKLM\Software\HackersAreUs Now let's add a value named "Stuff" and make it a binary entry with data "0001". The command would be REG ADD HKLM\Software\HackersAreUs /v Stuff /t REG_BINARY /d 0001 The two commands could have been executed as a single command but I have split them to make the process clearer. I have used upper case for REG ADD but that is for clarity and is not required.

Reg delete

Keys and values can be deleted in a similar but somewhat simpler fashion. The syntax is REG DELETE KeyName [/v ValueName | /ve | /va] [/f] Table III describes the parameters.

Table III. Parameters in REG DELETE command
Parameter Description
KeyName Complete Registry key name. Uses abbreviations HKCR, HKCU, HKLM, and HKU for root keys
/v ValueName Deletes a value
/ve Deletes a key's default value
/va Deletes all values from a key
/f Forces deletion with prompting

RegSafe Home Page

RegSafe Professional Edition 2.0 is a suite of tools designed to provide Network Administrators, IS/IT professionals and Power Users with the ability to perform advanced Registry management on 32-bit Windows PCs. RegSafe provides comprehensive Registry editing and management capabilities not found in other professional level Registry editing tools, all from within a protected environment.

Top 5 Reasons For Using RegSafe®

  1. Protected Environment
    RegSafe automatically saves a copy of the Registry before you edit and has "Undo" functions available while editing the Registry. Unlike other Registry editing tools, a mistake made while editing with RegSafe won't trash your system.
  2. Registry Comparison
    RegSafe goes beyond simple Registry Editing with its powerful Comparison features. Compare Current or Snapshot Registries, compare keys/values within the same Registry, compare access control lists (ACL) on Windows NT/2000 systems. You name it, RegSafe compares it!
  3. Powerful Export Features
    Administrators and other advanced users will appreciate RegSafe's export feature, which allows portions of a Registry or Registry comparison results tree to be exported to a .reg file (Regedit4 format).
  4. Partial or Full Registry Restoration
    If an unwanted change to the Registry was made, or a problem with the Registry is detected, RegSafe can perform a partial or full restoration of a Registry snapshot to the current ("live") Registry.
  5. Registry Restoration for Non-booting Systems
    RegSafe's Command Prompt SOS technology can restore the Registry even when your system will not boot into Windows. SOS restores the Registry on Windows 9x, ME, NT, 2000 systems with FAT, FAT32 and NTFS-formatted drives. In addition, RegSafe provides Recovery Console restoration on Windows 2000.


Etc

Society

Groupthink : Two Party System as Polyarchy : Corruption of Regulators : Bureaucracies : Understanding Micromanagers and Control Freaks : Toxic Managers :   Harvard Mafia : Diplomatic Communication : Surviving a Bad Performance Review : Insufficient Retirement Funds as Immanent Problem of Neoliberal Regime : PseudoScience : Who Rules America : Neoliberalism  : The Iron Law of Oligarchy : Libertarian Philosophy

Quotes

War and Peace : Skeptical Finance : John Kenneth Galbraith :Talleyrand : Oscar Wilde : Otto Von Bismarck : Keynes : George Carlin : Skeptics : Propaganda  : SE quotes : Language Design and Programming Quotes : Random IT-related quotesSomerset Maugham : Marcus Aurelius : Kurt Vonnegut : Eric Hoffer : Winston Churchill : Napoleon Bonaparte : Ambrose BierceBernard Shaw : Mark Twain Quotes

Bulletin:

Vol 25, No.12 (December, 2013) Rational Fools vs. Efficient Crooks The efficient markets hypothesis : Political Skeptic Bulletin, 2013 : Unemployment Bulletin, 2010 :  Vol 23, No.10 (October, 2011) An observation about corporate security departments : Slightly Skeptical Euromaydan Chronicles, June 2014 : Greenspan legacy bulletin, 2008 : Vol 25, No.10 (October, 2013) Cryptolocker Trojan (Win32/Crilock.A) : Vol 25, No.08 (August, 2013) Cloud providers as intelligence collection hubs : Financial Humor Bulletin, 2010 : Inequality Bulletin, 2009 : Financial Humor Bulletin, 2008 : Copyleft Problems Bulletin, 2004 : Financial Humor Bulletin, 2011 : Energy Bulletin, 2010 : Malware Protection Bulletin, 2010 : Vol 26, No.1 (January, 2013) Object-Oriented Cult : Political Skeptic Bulletin, 2011 : Vol 23, No.11 (November, 2011) Softpanorama classification of sysadmin horror stories : Vol 25, No.05 (May, 2013) Corporate bullshit as a communication method  : Vol 25, No.06 (June, 2013) A Note on the Relationship of Brooks Law and Conway Law

History:

Fifty glorious years (1950-2000): the triumph of the US computer engineering : Donald Knuth : TAoCP and its Influence of Computer Science : Richard Stallman : Linus Torvalds  : Larry Wall  : John K. Ousterhout : CTSS : Multix OS Unix History : Unix shell history : VI editor : History of pipes concept : Solaris : MS DOSProgramming Languages History : PL/1 : Simula 67 : C : History of GCC developmentScripting Languages : Perl history   : OS History : Mail : DNS : SSH : CPU Instruction Sets : SPARC systems 1987-2006 : Norton Commander : Norton Utilities : Norton Ghost : Frontpage history : Malware Defense History : GNU Screen : OSS early history

Classic books:

The Peter Principle : Parkinson Law : 1984 : The Mythical Man-MonthHow to Solve It by George Polya : The Art of Computer Programming : The Elements of Programming Style : The Unix Hater’s Handbook : The Jargon file : The True Believer : Programming Pearls : The Good Soldier Svejk : The Power Elite

Most popular humor pages:

Manifest of the Softpanorama IT Slacker Society : Ten Commandments of the IT Slackers Society : Computer Humor Collection : BSD Logo Story : The Cuckoo's Egg : IT Slang : C++ Humor : ARE YOU A BBS ADDICT? : The Perl Purity Test : Object oriented programmers of all nations : Financial Humor : Financial Humor Bulletin, 2008 : Financial Humor Bulletin, 2010 : The Most Comprehensive Collection of Editor-related Humor : Programming Language Humor : Goldman Sachs related humor : Greenspan humor : C Humor : Scripting Humor : Real Programmers Humor : Web Humor : GPL-related Humor : OFM Humor : Politically Incorrect Humor : IDS Humor : "Linux Sucks" Humor : Russian Musical Humor : Best Russian Programmer Humor : Microsoft plans to buy Catholic Church : Richard Stallman Related Humor : Admin Humor : Perl-related Humor : Linus Torvalds Related humor : PseudoScience Related Humor : Networking Humor : Shell Humor : Financial Humor Bulletin, 2011 : Financial Humor Bulletin, 2012 : Financial Humor Bulletin, 2013 : Java Humor : Software Engineering Humor : Sun Solaris Related Humor : Education Humor : IBM Humor : Assembler-related Humor : VIM Humor : Computer Viruses Humor : Bright tomorrow is rescheduled to a day after tomorrow : Classic Computer Humor

The Last but not Least Technology is dominated by two types of people: those who understand what they do not manage and those who manage what they do not understand ~Archibald Putt. Ph.D


Copyright © 1996-2021 by Softpanorama Society. www.softpanorama.org was initially created as a service to the (now defunct) UN Sustainable Development Networking Programme (SDNP) without any remuneration. This document is an industrial compilation designed and created exclusively for educational use and is distributed under the Softpanorama Content License. Original materials copyright belong to respective owners. Quotes are made for educational purposes only in compliance with the fair use doctrine.

FAIR USE NOTICE This site contains copyrighted material the use of which has not always been specifically authorized by the copyright owner. We are making such material available to advance understanding of computer science, IT technology, economic, scientific, and social issues. We believe this constitutes a 'fair use' of any such copyrighted material as provided by section 107 of the US Copyright Law according to which such material can be distributed without profit exclusively for research and educational purposes.

This is a Spartan WHYFF (We Help You For Free) site written by people for whom English is not a native language. Grammar and spelling errors should be expected. The site contain some broken links as it develops like a living tree...

You can use PayPal to to buy a cup of coffee for authors of this site

Disclaimer:

The statements, views and opinions presented on this web page are those of the author (or referenced source) and are not endorsed by, nor do they necessarily reflect, the opinions of the Softpanorama society. We do not warrant the correctness of the information provided or its fitness for any purpose. The site uses AdSense so you need to be aware of Google privacy policy. You you do not want to be tracked by Google please disable Javascript for this site. This site is perfectly usable without Javascript.

Last modified: March 12, 2019