Syarat-syarat

 Syarat - Syarat :
 1.Berikan ide atau saran agar blog ini dapat berkembang.
 2.Apa yang ada diblog ini hasil pencarian sang pemilik blog.
 3.Blog ini tidak mengambil secara utuh dari blog atau web orang lain. Apa yang dibahas dalam blog ini asli buatan/Editan sang pemilik blog.
Loading

Rabu, 23 Maret 2011

Microsoft DOS reg command

Syntax 

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
____________________________________________________________________________________
Syntax Operation And Sample :

1. QUERY

    Syntax : REG QUERY KeyName [/v ValueName | /ve] [/s]
    Keterangan

    KeyName   [\Machine\]FullKey.
    Machine      Name of remote machine, omitting defaults to the current machine Only HKLM and HKU
                       are available on remote machines.
    FullKey       in the form of ROOTKEY\SubKey name
                       ROOTKEY [ HKLM | HKCU | HKCR | HKU | HKCC ]
                       SubKey - The full name of a registry key under the selected ROOTKEY
    /v                query for a specific registry key
   ValueName  The name, under the selected Key, to query if omitted, all values under the Key are queried
   /ve               query for the default value or empty value name
   /s                 queries all subkeys and values

Example : - Displays the value of the registry value Version
                  REG QUERY HKLM\Software\Microsoft\ResKit /v Version
               - Displays all subkeys and values under the registry key Setup
                  REG QUERY HKLM\Software\Microsoft\ResKit\Nt\Setup /s

____________________________________________________________________________________
2. ADD

    Syntax : REG ADD KeyName [/v ValueName | /ve] [/t Type] [/s Separator] [/d Data] [/f]
    Keterangan

    KeyName   [\Machine\]FullKey.
    Machine      Name of remote machine, omitting defaults to the current machine Only HKLM and HKU
                       are available on remote machines.
    FullKey       in the form of ROOTKEY\SubKey name
                       ROOTKEY [ HKLM | HKCU | HKCR | HKU | HKCC ]
                       SubKey - The full name of a registry key under the selected ROOTKEY
    /v                query for a specific registry key
   ValueName  The name, under the selected Key, to query if omitted, all values under the Key are queried
   /ve               query for the default value or empty value name
   /t  RegKey   data types
                      [REG_SZ|REG_MULTI_SZ|REG_DWORD_BIG_ENDIAN|REG_DWORD|
                      REG_BINARY|REG_DWORD_LITTLE_ENDIAN|REG_NONE|REG_EXPAND_SZ]
                      If omitted, REG_SZ is assumed

   /s                Specify one charactor that you use as the separator in your data string for REG_MULTI_SZ
                     If omitted, use "\0" as the separator
   /d               The data to assign to the registry ValueName being added
   /f                Force overwriting the existing registry entry without prompt



Example : - Adds a key HKLM\Software\MyCo on remote machine ABC
                  REG ADD \\ABC\HKLM\Software\MyCo
               - Adds a value (name: Data, type: REG_BINARY, data: fe340ead)
                 REG ADD HKLM\Software\MyCo /v Data /t REG_BINARY /d fe340ead
               - Adds a value (name: MRU, type: REG_MUTLI_SZ, data: fax\0mail\0\0)
                 REG ADD HKLM\Software\MyCo /v MRU /t REG_MULTI_SZ /d fax\0mail
               - Adds a value (name: Path, type: REG_EXPAND_SZ, data: %systemroot%)
                 REG ADD HKLM\Software\MyCo /v Path /t REG_EXPAND_SZ /d %%systemroot%%

Notice: Use the double percentage ( %% ) inside the expand string


____________________________________________________________________________________
2.DELETE

    Syntax : REG DELETE KeyName [/v ValueName | /ve | /va] [/f]
    Keterangan

    KeyName   [\Machine\]FullKey.
    Machine      Name of remote machine, omitting defaults to the current machine Only HKLM and HKU
                       are available on remote machines.
    FullKey       in the form of ROOTKEY\SubKey name
                       ROOTKEY [ HKLM | HKCU | HKCR | HKU | HKCC ]
                       SubKey - The full name of a registry key under the selected ROOTKEY
    /v                query for a specific registry key
   ValueName  The name, under the selected Key, to query if omitted, all values under the Key are queried
   /ve               delete the value of empty value name

   /va               delete all values under this key

   /f                 Forces the deletion without prompt



Example : - Deletes the registry key Timeout and its all subkeys and values
                  REG DELETE HKLM\Software\MyCo\MyApp\Timeout
               - Deletes the registry value MTU under MyCo on ZODIAC
                 REG DELETE \\ZODIAC\HKLM\Software\MyCo /v MTU




Reg copy examples:
REG COPY HKLM\Software\MyCo\MyApp HKLM\Software\MyCo\SaveMyApp /s
Copies all subkeys and values under the key MyApp to the key SaveMyApp
REG COPY \\ZODIAC\HKLM\Software\MyCo HKLM\Software\MyCo1
Copies all values under the key MyCo on ZODIAC to the key MyCo1
on the current machine
Reg save examples:
REG SAVE HKLM\Software\MyCo\MyApp AppBkUp.hiv
Saves the hive MyApp to the file AppBkUp.hiv in the current folder
Reg restore examples:
REG RESTORE HKLM\Software\Microsoft\ResKit NTRKBkUp.hiv
Restores the file NTRKBkUp.hiv overwriting the key ResKit
Reg load examples:
REG LOAD HKLM\TempHive TempHive.hiv
Loads the file TempHive.hiv to the Key HKLM\TempHive
Reg unload examples:
REG UNLOAD HKLM\TempHive
Unloads the hive TempHive in HKLM
Reg compare examples:
REG COMPARE HKLM\Software\MyCo\MyApp HKLM\Software\MyCo\SaveMyApp
Compares all values under the key MyApp with SaveMyApp
REG COMPARE HKLM\Software\MyCo HKLM\Software\MyCo1 /v Version
Compares the value Version under the key MyCo and MyCo1
REG COMPARE \\ZODIAC\HKLM\Software\MyCo \\. /s
Compares all subkeys and values under HKLM\Software\MyCo on ZODIAC
with the same key on the current machine
Reg export examples:
REG EXPORT HKLM\Software\MyCo\MyApp AppBkUp.reg
Exports all subkeys and values of the key MyApp to the file AppBkUp.reg
Reg import examples:
REG IMPORT AppBkUp.reg
Imports registry entrys from the file AppBkUp.reg

Tidak ada komentar:

Posting Komentar