title: Change registry key before starting a windows service
body: <p>I have to find a way to change some registry keys BEFORE a specific Windows Service get started after a reboot.</p>
  
  <p>The service startup is set to automatic and my solution needs run only at the system startup (well... it could also be executed on manual service startup but it's not mandatory).</p>
  
  <p>I know my registry keys could be set using a batch file and a .reg file but I would like to know how and when to trigger the batch file if I want it to be executed before my service.</p>
  
  <p>For me, the simplest solution is always the best but if there's no other options, I can write something in .net.</p>