title: What is the "correct" way to use Chocolatey to install a Windows service?
body: <p>I'm looking for some guidance on how I should be packaging my TopShelf hosted Windows service for distribution via Chocolatey. Currently the .nuspec puts the .exe and all .dlls into the <code>\tools</code> folder, which means they end up installed to <code>ProgramData\chocolatey\lib\our-service\tools</code>. That just doesn't seem right. In fact it was not a problem until I noticed that the uninstall logs all sorts of errors. Which are all related to Chocolatey trying to back up the files but can't because they are in use because the service is running. The chocolateyuninstall.ps1 stops the service but it doesn't run till after the backup attempt.</p>
  
  <p>The application itself uses <code>ProgramData\MyCompany\MyApp</code> for all data and logging. Should I be putting the binaries there as well? Or is <code>Program Files</code> more appropriate? If one of these locations is correct, is chocolateyinstall.ps1 the logical place to put the code to xcopy the binaries? Or (and i hope you say no) is this not even a valid use of Chocolatey? Meaning like, should I suck it up and create an MSI for Chocolatey to operate on?</p>
  
  <p>Thanks</p>