<p>My current project involves deploying an upgraded .exe file that runs as a Windows Service.  In order to overwrite the existing .exe with the new version, I currently need to:</p>

<ol>
<li>Stop the service</li>
<li>Uninstall the service</li>
<li>Reboot the system (so Windows releases it's hold on the file)</li>
<li>Deploy the new .exe</li>
<li>Reinstall the service</li>
<li>Start the upgraded service.</li>
</ol>

<p>I'd like to avoid the reboot, so that this can be a fully scripted/automated upgrade.</p>

<p>Is there any way to avoid rebooting?  Maybe a command-line tool that will force Windows to give up it's death grip on the old .exe?</p>

Are you not able to stop the service before the update (and restart after the update) using the commands below?
```
```
net stop <service name>
net start <service name>
```
```
Whenever I'm testing/deploying a service I'm able to upload files without reinstalling as long as the service is stopped.  I'm not sure if the issue you are having is different.