title: Make a folder hidden using java 6 in Windows, but it failed
body: <p>I run my class in the command line, it's ok, but When I package my project as the service of Windows, it's failed. Anyone get the reason? 
  My service run as the System user, the tempFolder was created as System user.
  There is my code, and I didn't get any exception and error.</p>
  
  <pre><code>(!tempFolder.exists()){
              if(tempFolder.mkdirs()){
                  String operatingSystemName = System.getProperty("os.name");
                  if (operatingSystemName != null
                          &amp;&amp; operatingSystemName.startsWith(WINDOWS_FAMILY)) {
                      String string = " attrib " + tempFolder.getAbsolutePath()+ " +h";
                      try {
                          Runtime.getRuntime().exec(string);
                      } catch (Exception e) {
                          e.printStackTrace();
                      }
                  }
              }else {
                  throw new Exception("Can't create temp folder - " + tempFolder.toString());
              }
  </code></pre>