title: Executable running in background
body: <p>I am trying to run a simple batch script via Jenkins (which in turn calls a VBscript). The script which i am executing in Jenkins is: </p>
  
  <pre><code>cd "C:\Product\workspace"
  cscript Test.vbs
  </code></pre>
  
  <p>The test.vbs is simple code which calls an exe in console mode</p>
  
  <pre><code>Dim objShell
  Set objShell = WScript.CreateObject("WScript.Shell")
  objShell.Run "cmd /K C:\Product\workspace\Product.exe -c -dir C:\ProductDir", 1
  Set objShell = Nothing
  </code></pre>
  
  <blockquote>
    <p><em>The parameter 1 : Activates and displays a window. If the window is minimized or maximized, the system restores it to its original size and position.</em> </p>
  </blockquote>
  
  <p>The problem which I am facing is I am not able to see the cmd.exe and the Product.exe installer. Though the process explorer shows cmd.exe and Product.exe running. I don't get why I its not running in foreground and only in background. </p>
  
  <ol>
  <li>How can I get the exe to run in foreground?</li>
  <li>When I tried running directly on VM, I can see it running in foreground. Cant understand this situation. Any light on this?</li>
  </ol>
  
  <p>Thanks.</p>