Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Dear All,
I am trying to call bat files using macros with the help of j script. But while trying to run the program exception is happens. Below is the jscript code i have used in macros.
<html>
<head>
<title>Run Exe or Bat files from HTA by Hackoo</title>
<HTA:APPLICATION
APPLICATIONNAME="Run Exe or Bat files from HTA by Hackoo"
ID="MyHTMLapplication"
VERSION="1.0"/>
</head>
<script>
function RunExe(){
var shell = new ActiveXObject("WScript.Shell");
var path = '"D:/run.bat"';
shell.run(path,1,false);
}
</script>
<input style="width: 170px; height:23px; color: white; background-color: #203040;
font-family:Book Antiqua;" type="button" Value="bat" onClick="RunExe();"
</html>
No need to write in macro.
In qlikview script you can use it.
see help menu for how to use EXECUTE..
Regards,
Now Question to you
1) Why are you looking / calling thru Macro for that Bat file rather we have direct EXECUTE function.
I want to run the bat file through button. It should not be on every reload.
Hi Prasanth,
Thanks for your help, it is working fine at script level. But i want to run the bat file through button. It should not be on every reload.
Read this - run batch-file via button