title: Java: execute command in a new cmd.exe as administrator
body: <p>I want to execute a command from a Java-application using</p>
  
  <pre><code>Runtime.getRuntime.exec(command);
  </code></pre>
  
  <p>but the command need Admin-privileges. If I use </p>
  
  <pre><code>runas /user:Administrator "cmdName parameters"
  </code></pre>
  
  <p>nothing happens because I need to give user und pw as parameter to the command.
  But I need to run a command to the cmd, so that a new cmd.exe starts as administrator and asks if I want to run cmd.exe as admin. After agree the command should be run in the admin-cmd. So like this:</p>
  
  <pre><code>String command = "popupNewCmdAsAdminAndRun "batWhichNeedsAdmin.bat" "
  Runtime.getRuntime.exec(command);
  </code></pre>
  
  <p>Has anyone an Idea?
  Thanks in advance!</p>