title: Running a BAT file in background with invisible.vbs, but how to stop it?
body: <p>I'm using a solution like the one mentioned here <a href="https://stackoverflow.com/questions/1706075/run-bat-file-in-background">run bat file in background</a> but the bat file in question runs a Bitcoin GPU miner in the background. Sometimes I want to stop the miner, but since I am trying to run it invisibly (because I don't want it in my taskbar) I can't stop the process. I can't even find it in my process manager (no cmd.exe or conhost.exe). [I'm not even sure it's running.] Any help?</p>
  
  <p><em>edit: It is most definitely running; opening the process with a window shows that the miner was running at half capacity, which in the past indicated the miner was open twice.</em></p>
  
  <p><em>edit2: here are the contents of the batch files, if it helps.</em></p>
  
  <p>batch file I run to start everything:</p>
  
  <pre><code>wscript.exe "D:\Desktop\invisible.vbs" "C:\Program Files (x86)\Bitcoin\DiabloMiner\bpm.bat"
  </code></pre>
  
  <p>bpm.bat:</p>
  
  <pre><code>cd "C:\Program Files (x86)\Bitcoin\DiabloMiner"
  java -cp target\libs\*;target\DiabloMiner-0.0.1-SNAPSHOT.jar -Djava.library.path=target\libs\natives\windows com.diablominer.DiabloMiner.DiabloMiner -u &lt;username&gt; -p &lt;password&gt; -o &lt;pool&gt; -p 8332 -w 64 -f 1000
  </code></pre>
  
  <p>invisible.vbs:</p>
  
  <pre><code>set args = WScript.Arguments
  num = args.Count
  
  if num = 0 then
      WScript.Echo "Usage: [CScript | WScript] invis.vbs aScript.bat &lt;some script arguments&gt;"
      WScript.Quit 1
  end if
  
  sargs = ""
  if num &gt; 1 then
      sargs = " "
      for k = 1 to num - 1
          anArg = args.Item(k)
          sargs = sargs &amp; anArg &amp; " "
      next
  end if
  
  Set WshShell = WScript.CreateObject("WScript.Shell")
  
  WshShell.Run """" &amp; WScript.Arguments(0) &amp; """" &amp; sargs, 0, False
  </code></pre>