<p>There is also <a href="https://superuser.com/a/252850">this approach seen on SuperUser</a> which uses the <code>sc</code> command line instead of modifying the registry:</p>
<pre><code class="lang-auto">sc config <service name> binPath= <binary path>
</code></pre>
<p>Note: the space after <code>binPath=</code> is important. You can also query the current configuration using:</p>
<pre><code class="lang-auto">sc qc <service name>
</code></pre>
<p>This displays output similar to:</p>
<p>[SC] QueryServiceConfig SUCCESS</p>
<p>SERVICE_NAME: ServiceName</p>
<pre><code class="lang-auto"> TYPE : 10 WIN32_OWN_PROCESS
START_TYPE : 2 AUTO_START
ERROR_CONTROL : 1 NORMAL
BINARY_PATH_NAME : C:\Services\ServiceName
LOAD_ORDER_GROUP :
TAG : 0
DISPLAY_NAME : <Display name>
DEPENDENCIES :
SERVICE_START_NAME : user-name@domain-name
</code></pre>