Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
BouwerVa
Contributor II
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
marcus_sommer

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
Contributor II
Contributor II
Author

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

Here is my Code:

Code:Code:Error when putting it in QuotesError when putting it in Quotes

BouwerVa
Contributor II
Contributor II
Author

When putting it in double Quotes it does the same:

Image3.PNGImage4.PNG

marcus_sommer

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

- Marcus

BouwerVa
Contributor II
Contributor II
Author

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?

marcus_sommer

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
Contributor II
Contributor II
Author

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

Opening ExcelOpening ExcelOpening CMDOpening CMD

BouwerVa
Contributor II
Contributor II
Author

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

marcus_sommer

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