Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
sagarjagga
Creator
Creator

Want to Execute .Bat in load Script in Qlik sense Hub

I need to execute .bat from Qliksense Hub (not qliksense desktop)

10 Replies
juraj_misina
Luminary Alumni
Luminary Alumni

You can use the Execute statement:

https://help.qlik.com/en-US/sense/February2018/Subsystems/Hub/Content/Scripting/ScriptRegularStateme...


EDIT: To use Execute you need to switch to "Legacy mode" which is not recommended for security reasons. You really should know what you're doing here.

sagarjagga
Creator
Creator
Author

Thank you Juraj for your quick reply.

Can you elaborate how i can switch to legacy mode and how it hamper security

Thanks

juraj_misina
Luminary Alumni
Luminary Alumni

Hi,

I'll start with security. Go through these links and make sure you fully understand security implications of switching to legacy mode:

https://help.qlik.com/en-US/sense/February2018/Subsystems/Hub/Content/LoadData/file-system-access-re...

https://help.qlik.com/en-US/sense/February2018/Subsystems/Hub/Content/LoadData/disable-standard-mode...

If you still think this is what you want to do, then go to QMC->Engine->Advanced and uncheck "Standard Mode".

(as described here: https://help.qlik.com/en-US/sense/February2018/Subsystems/ManagementConsole/Content/edit-engine.htm).

Juraj

sagarjagga
Creator
Creator
Author

Thank you again Juraj. i want to call a HTML file through qliksense. so i am thinking to execute the bat from qliksense and that bat file will help to execute the HTML.

is there any direct way to call HTML from qliksense , if not , is there anyway to call bat file from qliksense hub without hampering the security

Thanks,

juraj_misina
Luminary Alumni
Luminary Alumni

Do you want to load data from an HTML file or open a browser and view an HTML file? If simply open a browser and view, any specific reason you need to do this from script?

sagarjagga
Creator
Creator
Author

i want to reload the NPrinting task after the qliksense app reload successfully. for that i will call an HTML once all the qliksense app reload successfully and then using javascript in the HTML , i will execute the NPrinting report tasks.

nprinting 17 task reload after QMC task

juraj_misina
Luminary Alumni
Luminary Alumni

Optionally you can call NPrinting API directly from the script:

How to use Qlik NPrinting APIs inside a Qlik Sense load script

I understand you would need to upgrade the REST connector to recently released version 1.3, possibly the whole environment to Feb 2018 (not sure, did not go through all the details). This would be the safest way to do it.

sagarjagga
Creator
Creator
Author

i have 1.2 version of REST connector. So it may also not help

juraj_misina
Luminary Alumni
Luminary Alumni

REST connector is available as a separate download, so you can download the most recent version from the download site.