title: How do I import registry settings using TeamCity?
body: <p>I'm having trouble importing settings from a <code>.reg</code> file using TeamCity. The app in question has a lot of registry settings which change fairly regulary so it is vital to have it as a build step.</p>
  
  <p>I'm using the following command:</p>
  
  <pre><code>regedit /s "C:\app\params\epm\epm_tlp\trunk\csr_vsm_tlp_exl.reg"
  </code></pre>
  
  <p>The path is fine (I checked several times). When I run this command manually, it works. However, when run from TeamCity, it doesn't seem to do anything. Here's the log:</p>
  
  <pre><code>[16:01:13]: Checking for changes
  [16:01:16]: Clearing temporary directory: C:\TeamCity\buildAgent\temp\buildTmp
  [16:01:16]: Checkout directory: C:\app
  [16:01:16]: Updating sources: server side checkout... (1s)
  [16:01:16]: [Updating sources: server side checkout...] Building incremental patch for VCS root: NEP-content
  [16:01:18]: [Updating sources: server side checkout...] Repository sources transferred
  [16:01:18]: Step 1/2
  [16:01:18]: [Step 1/2] Using runner: simpleRunner
  [16:01:18]: [Step 1/2] Starting: C:\TeamCity\buildAgent\temp\agentTmp\custom_script1107617910631593889.cmd
  [16:01:18]: [Step 1/2] in directory: C:\app\params\epm\epm_tlp\trunk
  [16:01:18]: [Step 1/2] C:\app\params\epm\epm_tlp\trunk&gt;regedit /s "C:\app\params\epm\epm_tlp\trunk\csr_vsm_tlp_exl.reg"
  [16:01:18]: [Step 1/2] Process exited with code 0
  [16:01:18]: Step 2/2
  [16:01:18]: [Step 2/2] Using runner: simpleRunner
  [16:01:18]: [Step 2/2] Starting: c:\app\exe\startup.exe
  [16:01:18]: [Step 2/2] in directory: C:\app\exe
  [16:01:18]: [Step 2/2] Process exited with code -1073741515
  [16:01:18]: [Step 2/2] Step failed
  [16:01:18]: Publishing artifacts
  [16:01:18]: [Publishing artifacts] Paths to publish: [teamcity-info.xml]
  [16:01:18]: [Publishing artifacts] Sending files
  [16:01:18]: Build finished
  </code></pre>
  
  <p>This is the first time I'm trying out TeamCity, so I have no idea where to start looking for trouble, why would this command fail? Could there be any security causes? Are TeamCity runners running as another user?</p>