Qlik Community

Qlik Sense App Development

Discussion board where members can learn more about Qlik Sense App Development and Usage.

BouwerVa
New Contributor II

EXECUTE

Hi

I am trying to Execute an external program after my script has finished.

I did all the necessary adjustment:

1 - Running in Legacy Mode

2 - Adjust System.ini to make the following changed: OverrideScriptSecurity=1  

The Script is running but nothing happens it just stays on the screen below:

Capture.PNG

9 Replies
MVP & Luminary
MVP & Luminary

Re: EXECUTE

Your execute-statement might be not valid - the visible path-part includes spaces and I don't see that the path is wrapped with double-quotes.

- Marcus

BouwerVa
New Contributor II

Re: EXECUTE

Tried putting it in Quotes got an Error posted images both below.

Here is my Code:

Image1.PNGCode:Image2.PNGError when putting it in Quotes

BouwerVa
New Contributor II

Re: EXECUTE

When putting it in double Quotes it does the same:

Image3.PNGImage4.PNG

MVP & Luminary
MVP & Luminary

Re: EXECUTE

Try it with double-quotes like "statement" and not single-quotes 'statement'.

- Marcus

BouwerVa
New Contributor II

Re: EXECUTE

Hi

I tried both. See post above.

In Qlikview they talk about giving permission to open external program.

Do I need to do it for QlikSense as well?

MVP & Luminary
MVP & Luminary

Re: EXECUTE

I never did it in Sense and therefore I don't know which settings are needed to get it to work.

But I assume that your statement is executed - you could check within the task-manager if there occured another excel.exe - and then Qlik is waiting for any response from excel which didn't come ...

I think you need to add some further things to your statement, for example to open a certain file ... It might be also useful just to start a vbs-batch with EXECUTE and to use them to execute the real logic (it will be more flexible, heavier and you could return some error-messages and or including some kind of logging) ... here two links which should be helpful for you:

Open-an-Excel-workbook-using-Qlikview
Run-Excel-from-QMC

- Marcus

BouwerVa
New Contributor II

Re: EXECUTE

Hi

I run the script again and check the Task Manager.

The program opens in the Task Manager but still doesn't show. 

I must be missing something

Image6.PNGOpening ExcelImage7.PNGOpening CMD

Highlighted
BouwerVa
New Contributor II

Re: EXECUTE

I think i found me problem. 

I'm not sure why it happens and how to fix it.

When I run the EXECUTE it open the application as a Background Process and not as a Apps Process.

Does anyone know why?

Image8.PNG

MVP & Luminary
MVP & Luminary

Re: EXECUTE

Yes, therefore I suggested to look into the taskmanager and to add something more to the statement as just starting the program-exe. I'm not sure if opening a certain file will always open it as a frontend-process but with one or another extra parameter (to set the visibility to TRUE) and/or if this file contained own OnOpen-trigger it should be possible.

I never did it in this way else I use always to start a (vbs) batch which then executes my real tasks which provides a lot more flexibility to do anything and everything could happens within a common context - otherwise you would need to access a from Qlik completely independent process (probably possible but definitely not easy).

- Marcus