title: SonarQube - Temp directory is not writable
body: <p>I'm installing SonarQube v5.0.1.</p>
  
  <p>I'm running Windows Server 2012 64-bit, Java 1.8 64-bit, and the SonarQube windows-x86-64 wrapper.</p>
  
  <p>SonarQube keeps throwing the following error:</p>
  
  <pre><code>WrapperSimpleApp: Encountered an error running main: java.lang.IllegalStateException: Temp directory is not writable: C:\Windows\system32\config\systemprofile\AppData\Local\Temp\
  java.lang.IllegalStateException: Temp directory is not writable: C:\Windows\system32\config\systemprofile\AppData\Local\Temp\
      at org.sonar.process.MinimumViableSystem.checkWritableDir(MinimumViableSystem.java:60)
      at org.sonar.process.MinimumViableSystem.checkWritableTempDir(MinimumViableSystem.java:52)
      at org.sonar.process.MinimumViableSystem.check(MinimumViableSystem.java:45)
      at org.sonar.application.App.main(App.java:113)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
      at java.lang.reflect.Method.invoke(Unknown Source)
      at org.tanukisoftware.wrapper.WrapperSimpleApp.run(WrapperSimpleApp.java:240)
      at java.lang.Thread.run(Unknown Source)
  Caused by: java.io.IOException: The system cannot find the path specified
      at java.io.WinNTFileSystem.createFileExclusively(Native Method)
      at java.io.File.createTempFile(Unknown Source)
      at org.sonar.process.MinimumViableSystem.checkWritableDir(MinimumViableSystem.java:57)
      ... 9 more
  &lt;-- Wrapper Stopped
  </code></pre>
  
  <p>Why does SonarQube keep trying to write to C:\Windows\System32\config\systemprofile\AppData\Local instead of C:\Windows\SysWOW64\config\systemprofile\AppData\Local?</p>
  
  <p>To get rid of this error in previous installations, I've had to create a Temp folder in C:\Windows\System32\config\systemprofile\AppData\Local and fiddle with the read/write settings and or permissions to get SonarQube to stop complaining.</p>
  
  <p><strong>UPDATE:</strong> This is a huge problem, because I can't start SonarQube as a Windows  Service.  What's weird is that I already had SonarQube installed and running as a Windows Service.  Today, I stopped the service, and now I can't start the service anymore.  I've set the Temp folder's permissions to be not Read-Only and so that Everyone has Full Control (not ideal, I know...)</p>
  
  <p>Still, the Temp error prevents SonarQube from starting.</p>