Updating a registry key via command line

Posted by / 11-Apr-2020 19:24

The service restart parameters are specified in the Registry as the "Failure Actions" REG_BINARY value.

This information is based on the SERVICE_FAILURE_ACTIONS / SC_ACTION data structures although without investigating further, it's difficult to see how these values are related.

You can try creating a service, manually configure it through the Windows Service manager, and then see if copying the REG_BINARY value to another service definition in the Registry.

The SQL Anywhere registry service information can be found underneath: How does SQL Anywhere behave differently when running as a service?

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.

That way, if anything unexpected happens, you can roll back to a previous version that works properly.

) You can also use sc config to set things like delayed start-up, service dependencies etc. There must be no space between the keyword (eg "actions" or "reset") and the equals sign, and there must be a space after the equals sign.

There is no current way to control this behaviour via dbsvc.

In this example, assume that you want to change a key value associated with the program called CHKDSK, and that you have been told it exists at the following location: HKEY_LOCAL_MACHINE\System\Current Control Set\Control\Session Manager\Boot Execute Find the specific Registry key.

In the panel on the left-hand side of the Registry Editor, find the top-level folder named HKEY_LOCAL_MACHINE.

updating a registry key via command line-45updating a registry key via command line-76updating a registry key via command line-60

Visit Stack Exchange As of the time of writing this, the accepted answer to this by David Marshall answers the question, but doesn't provide any detail beyond the link itself.

One thought on “updating a registry key via command line”