Updating a registry key command

31 Jan

(default is all keys and values) /d Data : The actual data to store as a "String", integer etc /f : Force an update without prompting "Value exists, overwrite Y/N" \Machine : Name of remote machine - omitting defaults to current machine.

Only HKLM and HKU are available on remote machines.

Registry data stored under HKCU will be visible and writable by the currently logged in user.

Registry data stored under HKLM will be visible to all users and writable by administrators.

/S Separator : Character to use as the separator in REG_MULTI_SZ values the default is "

Syntax: REG QUERY [ROOT\]Reg Key /v Value Name [/s] REG QUERY [ROOT\]Reg Key /ve --This returns the (default) value REG ADD [ROOT\]Reg Key /v Value Name [/t Data Type] [/S Separator] [/d Data] [/f] REG ADD [ROOT\]Reg Key /ve [/d Data] [/f] -- Set the (default) value REG DELETE [ROOT\]Reg Key /v Value Name [/f] REG DELETE [ROOT\]Reg Key /ve [/f] -- Remove the (default) value REG DELETE [ROOT\]Reg Key /va [/f] -- Delete all values under this key REG COPY [\Source Machine\][ROOT\]Reg Key [\Dest Machine\][ROOT\]Reg Key REG EXPORT [ROOT\]Reg Key File REG IMPORT File REG SAVE [ROOT\]Reg Key File REG RESTORE \Machine Name\[ROOT]\Key Name File REG LOAD File Name Key Name REG UNLOAD Key Name REG COMPARE [ROOT\]Reg Key [ROOT\]Reg Key [/v Value Name] [Output] [/s] REG COMPARE [ROOT\]Reg Key [ROOT\]Reg Key [/ve] [Output] [/s] Key: ROOT : HKLM = HKey_Local_machine (default) HKCU = HKey_current_user HKU = HKey_users HKCR = HKey_classes_root Value Name : The value, under the selected Reg Key, to edit.I am using the New-Item Property cmdlet, but it fails if the registry key does not exist.I added the –Force parameter, but it still will not create the registry key.How do I modify an existing registry key value from cmd?There are a lot of options and switches, bells and whistles, for the Reg command.

" /t Data Type : REG_SZ (default) | REG_DWORD | REG_EXPAND_SZ | REG_MULTI_SZ /reg:32 : Force to write to the 32-bit registry location /reg:64 : Force to write to the 64-bit registry location By default a 32-bit process (such as an SCCM client or a 32 bit MSI installer) on a 64 bit machine, will use a 32-bit view of the registry: HKLM\SOFTWARE\Wow6432Node Use the /REG switch to over-ride this. Output : /od (only differences) /os (only matches) /oa (all) /on (no output)to the command line, assuming the Remote Registry Service is running.

Depending on the registry permissions, REG ADD may require running from an elevated command prompt.

Syntax: REG QUERY [ROOT\]Reg Key /v Value Name [/s] REG QUERY [ROOT\]Reg Key /ve --This returns the (default) value REG ADD [ROOT\]Reg Key /v Value Name [/t Data Type] [/S Separator] [/d Data] [/f] REG ADD [ROOT\]Reg Key /ve [/d Data] [/f] -- Set the (default) value REG DELETE [ROOT\]Reg Key /v Value Name [/f] REG DELETE [ROOT\]Reg Key /ve [/f] -- Remove the (default) value REG DELETE [ROOT\]Reg Key /va [/f] -- Delete all values under this key REG COPY [\Source Machine\][ROOT\]Reg Key [\Dest Machine\][ROOT\]Reg Key REG EXPORT [ROOT\]Reg Key File REG IMPORT File REG SAVE [ROOT\]Reg Key File REG RESTORE \Machine Name\[ROOT]\Key Name File REG LOAD File Name Key Name REG UNLOAD Key Name REG COMPARE [ROOT\]Reg Key [ROOT\]Reg Key [/v Value Name] [Output] [/s] REG COMPARE [ROOT\]Reg Key [ROOT\]Reg Key [/ve] [Output] [/s] Key: ROOT : HKLM = HKey_Local_machine (default) HKCU = HKey_current_user HKU = HKey_users HKCR = HKey_classes_root Value Name : The value, under the selected Reg Key, to edit.I am using the New-Item Property cmdlet, but it fails if the registry key does not exist.I added the –Force parameter, but it still will not create the registry key.How do I modify an existing registry key value from cmd?There are a lot of options and switches, bells and whistles, for the Reg command.