Finding the startup parameters used by your Windows Service

When you install one of the Tridion micro-services as a Windows service, you can specify a number of startup parameters. These may include settings such as the database host, database login, the port to use, etc.

These settings will be remembered and used every time the Windows service starts.

But what if you want to see which settings were used, later on?
For that, you will have to look in the Windows registry. The following location is an example using the Discovery service:

HKEY_LOCAL_MACHINE\SOFTWARE\WOW6432Node\Apache Software Foundation\Procrun 2.0\SDLWebDiscoveryService\Parameters

You’ll notice a number of sub-keys: Java, Log, Start, and Stop. The most interesting information is in the Java and Start keys.

The Java key contains the classpath to use (yes, set at the time of installation), the JVM options, and most of the parameters specified for the service (in the Options value).

Java key

Registry key containing most of the startup options

The Start key contains the working directory and the parameters directly related to the hosting of the service (e.g. port to use and whether or not it should register its capabilities with the Discovery service automatically).

Start key

Registry key containing the hosting options

 

If you just need to tweak one of the values, you can edit these registry keys and restart the service. If you require a large amount of changes, I recommend simply uninstalling the service and re-installing it with the new parameters.

2 thoughts on “Finding the startup parameters used by your Windows Service

  1. Nice post, Peter! On the last point for making changes to a service, that’d only be for self-hosted machines or VMs, right? From what I understand about cloud setups, I think these kinds of configuration changes should be in some script somewhere. :-)

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>