exportation/importation clé de registre

exportation/importation clé de registre - Win NT/2K/XP - Windows & Software

Marsh Posté le 16-08-2004 à 22:56:59    

bonsoir a tous j aimerai savoir si il y a une commande afin d'automatiser
l'exportation/importation d'une cle de la base de registre (y compris sur
une machine distance). En faite j'aimerai réaliser cette opération sous
forme de srcipt.
 
merci pour vos réponses.

Reply

Marsh Posté le 16-08-2004 à 22:56:59   

Reply

Marsh Posté le 16-08-2004 à 22:58:35    

Import, export or delete registry settings from a text (.REG) file
 
 
syntax
      Export the Registry (all HKLM plus current user)
      REGEDIT /E pathname
 
      Export part of the Registry
      REGEDIT /E pathname "RegPath"
 
      Import a reg script
      REGEDIT pathname
 
      Silent import
      REGEDIT /S pathname
 
      Start the regedit GUI
      REGEDIT  
 
key
   /E : Export  
 
   /S : Silent Import
How to add keys and values from the registry:
 
Create a text file like this:
 
REGEDIT4
[HKEY_CURRENT_USER\SomeKey]
"SomeStringValue"="Hello"  
When double clicking this .reg file the key and value will be added.
Alternatively run REGEDIT MYKEY.REG from the command line.
 
How to delete keys and values from the registry:
 
Create a reg file like this, notice the hyphen inside the first bracket  
 
REGEDIT4
[-HKEY_CURRENT_USER\SomeKey]  
When double clicking this .reg file the key "SomeKey" will be deleted along with all string, binary or Dword values in that key.
 
If you want to just delete values leaving the key in place, set the value you want to delete = to a hyphen
e.g.  
 
REGEDIT4
[HKEY_CURRENT_USER\SomeKey]
"SomeStringValue"=-
 
Again double clicking this .reg file will delete the values specified - or you can use REGEDIT /s MyDeleteScript.REG.
 
Windows XP Registry files.
Under Windows NT all registry scripts start with:
REGEDIT4
 
Under 2K and XP this first line changes to:
Windows Registry Editor Version 5.00  
 
To be sure that a .REG script will run under any version of Windows use the earlier syntax: REGEDIT4.
 
Compare the Registry of two machines
 
Windiff is your friend, this simple GUI utility from the resource kit will list all the differences.
 
Comments
Within a registry file, comments can be preceded by "; "  
e.g.
;
; Turn the NUMLOCK on at login
;  
[HKEY_CURRENT_USER\Control Panel\Keyboard]  
"InitialKeyboardIndicators"="2"  
 
Related commands:
 
REGEDT32.EXE - Edit the registry including Security and Auditing Options (NT 4)
REG - Read, Set or Delete registry keys and values  
SET - Display, set, or remove Windows NT environment variables  
SETX - Set environment variables permanently
Dureg - Registry Size Estimator. (Win 2K ResKit)  
WinXP registry - User interface settings  
 
Equivalent Linux BASH commands:
 
none
 


http://www.ss64.com/nt/regedit.html

Reply

Marsh Posté le 16-08-2004 à 22:58:44    

Reply

Marsh Posté le 16-08-2004 à 23:32:01    

Merci :jap:

Reply

Marsh Posté le 18-08-2004 à 22:35:29    

bonjour petit up de mon post
 
je cherche à savoir si je peux (de mon poste pc1)user des syntaxes "regedit /a" et "regedit /s" pour exporter une clé de registre d'un pc2 et l'importer vers un pc3.
je regcherche la syntaxe ou tout autre solution m'évitant de passer par une quelconque api.
merci pour votre aide

Reply

Marsh Posté le 18-08-2004 à 23:54:28    

yop ! c'est bon j'ai trouvé mon bonheur avec reg.exe
 
++

Reply

Sujets relatifs:

Leave a Replay

Make sure you enter the(*)required information where indicate.HTML code is not allowed