How do i call a .vbs file from within a webform?
I'm back with another question!
I have a vbscript file that does some wscript.shell calls to login to a series of sites and do some minor data mining. Well, this is all dandy, but how do i, within a click event of a button control or linkbutton control, fire off this .vbs file named GetFiles.vbs?
I know there is a solution client side via the following example, but
when i try to make this server side by putting the vbscript code within the <% ... %> or <script language=vbscript runat=server> ... </script> blocks, it just gives me the windows error beep noise, but no prompt as to what is the problem!!
here is the client side example that requires users to enable activeX Scripts that may not be safe, and also i think the files will download to their local machine, not to my server which is a big no no! well here goes anyways
Set oWSH= CreateObject("WScript.Shell")
oWSH.Run "C:\....\ScriptFiles\GetWCFiles.vbs", 1, True
set oWSH = nothing
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<TITLE> Pop Exe </TITLE>
<input type="button" name="btnLaunch" onClick="PopExe" value="Launch Exe" ID="Button1">
<a href="#" onClick="PopExe">Launch Exe</a>
as you can see this uses shell scripting to call the vbs file, is there a more simple way? i've tried putting the code in an asp page within <% ... %> but no go! thanks for you help in advance