title: How do I end up running a batch file from vbscript?
body: <p>I have a batch file that is save in a shared drive (<code>S:</code>) and I am trying to use vbscripts createobject method to create a shell script to run my batch file. My current vbscript is:</p>
  
  <pre><code>&lt;script language="VBScript"&gt;
  Sub zeprint()
  Dim oShell
  Set oShell = WScript.CreateObject("WScript.Shell")
  oShell.CurrentDirectory = "s:"
  oShell.Run "s:\batprint.bat"
  Set oShell = Nothing
  End Sub
  &lt;/script&gt;
  </code></pre>
  
  <p>Then in some html I have, I created a button and set <code>onclick="zeprint()"</code>.
  I know the button works because I use to have it assigned to <code>window.print();</code>.
  I have been searching all over for the answer to this but cannot seem to figure out why it isn't working. The batch file also runs correctly when manually ran from the command prompt. This leads me to believe that it is a problem with the vbscript.</p>
  
  <p>Any help would be appreciated.</p>