Difference between revisions of "Adding Registry Settings"

From WPKG | Open Source Software Deployment and Distribution
Jump to: navigation, search
(Undo revision 8447 by 174.54.240.129 (Talk))
(added stub information for regini.exe)
Line 1: Line 1:
= RegEdit =
+
=RegEdit=
  
 
Windows has a registry editing program called RegEdit which can be used interactively or it can be scripted. This can be useful to setup defaults for applications, or apply [http://www.winguides.com/registry/ registry tweaks for various Windows settings].
 
Windows has a registry editing program called RegEdit which can be used interactively or it can be scripted. This can be useful to setup defaults for applications, or apply [http://www.winguides.com/registry/ registry tweaks for various Windows settings].
Line 34: Line 34:
 
You can create ready-made .reg files by exporting registry keys from within RegEdit.
 
You can create ready-made .reg files by exporting registry keys from within RegEdit.
  
= Reg =
+
=Reg=
  
 
Alternatively, included with Windows 2000 Resource Kit, or with Windows XP itself, there is a command line registry editor, reg.exe, that can be used more directly from the command-line. For example:
 
Alternatively, included with Windows 2000 Resource Kit, or with Windows XP itself, there is a command line registry editor, reg.exe, that can be used more directly from the command-line. For example:
 
<code><pre>REG ADD HKLM\SOFTWARE\Test /v "Test Setting" /d "1" /t REG_DWORD</pre></code>
 
<code><pre>REG ADD HKLM\SOFTWARE\Test /v "Test Setting" /d "1" /t REG_DWORD</pre></code>
 
----
 
----
 +
 +
=Regini=
 +
You can modify registry entries and permissions with Regini.exe .
 +
 +
The Regini.exe utility is included in the Windows NT Server 4.0 Resource Kit, in the Microsoft Windows 2000 Resource Kit, and in the Microsoft Windows Server 2003 Resource Kit.
 +
 +
Please see the MS KB article for details:
 +
[http://support.microsoft.com/kb/264584 Microsoft KB article 264584]
  
 
[[Category: Silent Installers]]
 
[[Category: Silent Installers]]
 
[[Category: Changing Windows settings]]
 
[[Category: Changing Windows settings]]

Revision as of 11:59, 17 November 2010

RegEdit

Windows has a registry editing program called RegEdit which can be used interactively or it can be scripted. This can be useful to setup defaults for applications, or apply registry tweaks for various Windows settings.

To run RegEdit interactively, run the program regedit.exe.

To script the amendment of the registry using RegEdit, use it in the form regedit.exe /s <filename>.reg.

You can use RegEdit from WPKG to silently import registry settings, for example:

 <package
     id="sample_registry"
     name="Adds the contents of a .reg file to the registry"
     revision="1"
     priority="0"
     execute="once">
   <check type="registry" condition="equals" path="HKEY_LOCAL_MACHINE\SOFTWARE\Test" value="1" />
   <install cmd='regedit /s "%SOFTWARE%\test_registry.reg"' />
 </package>

And the sample file:

test_registry.reg:

Windows Registry Editor Version 5.00

[HKEY_LOCAL_MACHINE\SOFTWARE\Test]
"Test Setting"=dword:00000001
[-HKEY_LOCAL_MACHINE\SOFTWARE\TEST2]

(In Windows 2000/XP, adding "-" in front of a key name causes that key to be deleted from the registry.)

You can create ready-made .reg files by exporting registry keys from within RegEdit.

Reg

Alternatively, included with Windows 2000 Resource Kit, or with Windows XP itself, there is a command line registry editor, reg.exe, that can be used more directly from the command-line. For example:

REG ADD HKLM\SOFTWARE\Test /v "Test Setting" /d "1" /t REG_DWORD

Regini

You can modify registry entries and permissions with Regini.exe .

The Regini.exe utility is included in the Windows NT Server 4.0 Resource Kit, in the Microsoft Windows 2000 Resource Kit, and in the Microsoft Windows Server 2003 Resource Kit.

Please see the MS KB article for details: Microsoft KB article 264584