Re: Registry Add Commands



You shd be getting the following output.

C:\>reg add /?

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


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

KeyName [\\Machine\]FullKey
Machine Name of remote machine - omitting defaults to the
current
machine Only HKLM and HKU are available on remote
machines
FullKey ROOTKEY\SubKey
ROOTKEY [ HKLM | HKCU | HKCR | HKU | HKCC ]
SubKey The full name of a registry key under the selected
ROOTKEY

/v The value name, under the selected Key, to add

/ve adds an empty value name <no name> for the key

/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

Examples:

REG ADD \\ABC\HKLM\Software\MyCo
Adds a key HKLM\Software\MyCo on remote machine ABC

REG ADD HKLM\Software\MyCo /v Data /t REG_BINARY /d fe340ead
Adds a value (name: Data, type: REG_BINARY, data: fe340ead)

REG ADD HKLM\Software\MyCo /v MRU /t REG_MULTI_SZ /d fax\0mail
Adds a value (name: MRU, type: REG_MUTLI_SZ, data: fax\0mail\0\0)

REG ADD HKLM\Software\MyCo /v Path /t REG_EXPAND_SZ /d %%systemroot%%
Adds a value (name: Path, type: REG_EXPAND_SZ, data: %systemroot%)
Notice: Use the double percentage ( %% ) inside the expand string

--
Thanks,
Puja
---------------------------------------------------------
This posting is provided "AS IS" with no warranties, and confers no rights.
"Terry Swift" <TerrySwift@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:D0253ED7-CB76-4D24-9BB8-9A952384D5A2@xxxxxxxxxxxxxxxx
> John,
>
> When I'm in the "cmd" prompt and doing the "reg add /?" without the quotes
> of course, it gives me the 'reg' is not recognized as an internal or
> external
> command, operable program or batch file. I've never heard of reg.exe
> version
> 2.0 or newer - where does that come from? I have SP4 and the highest
> update
> after that, so I would assume that my files would be updated to the latest
> and greatest.
>
> Terry
>
> "John Wunderlich" wrote:
>
>> "=?Utf-8?B?VGVycnkgU3dpZnQ=?="
>> <TerrySwift@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in
>> news:9667F968-BE80-4767-8C16-BAE4F94919D1@xxxxxxxxxxxxx:
>>
>> > Here are the two keys that the Tech wants to be installed. I put
>> > them into the .reg file, but they wouldn't load.
>> >
>> > HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\BITS\Parameter
>> > s /v ServiceDll /t REG_EXPAND_SZ /d %windir%\System32\qmgr.dll
>> >
>> > HKey_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\BackupRestore\F
>> > ilesNotToBackup
>> >
>> > Are there are commands that I need to put in from of the keys to
>> > get them to load?
>> >
>> > Terry
>> >
>>
>> Assuming you are using reg.exe version 2.0 or newer, simply put
>> reg add
>> in front of your commands at a command prompt. For help, type
>> "reg add /?".
>> So your first example would be:
>> reg add HKLM\SYSTEM\CurrentControlSet\Services\BITS\Parameters /v
>> ServiceDll /t REG_EXPAND_SZ /d %windir%\System32\qmgr.dll
>>
>> This is not the correct format for a ".reg" file.
>>
>> HTH,
>> John
>>


.



Relevant Pages

  • Re: Modify Registry on all SBS2003 clients
    ... registry setting to all workstations. ... command "REG ADD" to modify registry. ... the following command will change the registry value as your ... You may copy above command into the login script file SBS_LOGIN_SCRIPT.bat ...
    (microsoft.public.windows.server.sbs)
  • Re: Modify Registry on all SBS2003 clients
    ... registry setting to all workstations. ... command "REG ADD" to modify registry. ... the following command will change the registry value as ... and put the command lines at the bottom of the script file. ...
    (microsoft.public.windows.server.sbs)
  • Re: Registry Add Commands
    ... I can load registry files using a .reg file, otherwise known as a Reg4 file ... >>> in front of your commands at a command prompt. ... >>> John ...
    (microsoft.public.win2000.general)
  • Re: regedit /s via network
    ... Are you looking for a command line tool or GUI tool? ... the regedit.exe feature I mentioned earlier (Connect Network Registry) is what you really need - you will be able to ... The same way you can import .reg files. ...
    (microsoft.public.windowsxp.embedded)
  • Re: Edit Default User NTUSER.DAT
    ... Olof, this is exactly what I was looking for. ... I can load the ntuser.dat file into the hive ok ... I then reg import my .reg file ... >But if you want to do it from a script or command line, ...
    (microsoft.public.win2000.security)