Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi All,
I need to call a batch file from qlikview script and also send 5 parameters to batch file. So can anyone send me the script .
I tried below script but didnt work .
Execute cmd.exe /C E:\Qvd to be pushed to Mysql\Textfile.bat 3313 DatamapLoad Deletemetemp;
where 3313 ,DatamapLoad and Deletemetemp are arguements to be passed to batch file .
Try to use WScript.Arguments...
Dim obj
Set obj = CreateObject("WScript.Shell")
Set oArgs = wscript.Arguments
obj.Run "c:\test.bat " & oArgs(0), , TRUE
Please explain in details what is exact you are looking for ?
Hi
I need to execute a bat file through Qlikview script. After relaod of the applicatio .bat file needs to execute.
Execute cmd.exe /c "E:\Qvd to be pushed to Mysql\Textfile.bat" works well.No issues uptill now. But when i try to pass the parameters to batch file ,it doesnt work .
When i execute the script through cmd it works fine .
That means issue is with the qlikview. Does QV allow us to pass parameters to batch file in first palce ??
1. Qlikview Allows us to pass parametes along with batch file
2. You can execute the script through qvw create new qvw2 in script edit
type following commands
EXECUTE cmd.exe /C C:\Export-Email-Automation\TriggerMacro.bat;
EXIT SCRIPT;
moment when you reload qvw2 your batch job will execute .
Hope this you are looking for .
Vikas
Hi,
Try the WScript.Shell object.
The following is an example to run a preview report from NPrinting:
The following example shows you how to run a batch file:
Hi Vikas,
The script which you sent works well. But now how will i send the parameters to TriggerMacro.bat file ?
Yes you can pass parameters to macros Following command TriggerMacro is parameter passed.
"C:\Program Files\QlikView\QV.exe" /Vv TriggerMacro=0 "C:\Export-Email-Automation\Dashboard.qvw"
Vikas
Hi
Sorry for the trouble , but can you give me the example using below script
EXECUTE cmd.exe /C C:\Export-Email-Automation\TriggerMacro.bat;
EXIT SCRIPT;
I tried 1)EXECUTE cmd.exe /C "C:\Export-Email-Automation\TriggerMacro.bat" Parameter1 Parameter2;
2)EXECUTE cmd.exe /C "C:\Export-Email-Automation\TriggerMacro.bat; Parameter1 Parameter2";
Both the above scripts didnt work
i dont understand
"C:\Program Files\QlikView\QV.exe" /Vv TriggerMacro=0 "C:\Export-Email-Automation\Dashboard.qvw"
Can u explain it a bit .
Try to use WScript.Arguments...
Dim obj
Set obj = CreateObject("WScript.Shell")
Set oArgs = wscript.Arguments
obj.Run "c:\test.bat " & oArgs(0), , TRUE
Andrea its not working ,,,
i tried
copied the below script in VBS file
Dim obj
Set obj = CreateObject("WScript.Shell")
Set oArgs = WScript.Arguments
obj.Run "E:\Qvd to be pushed to Mysql\Textfile.bat " & oArgs(0) & oArgs(1)& oArgs(2), , TRUE
and called the vbs file through button
But sadly not working