Qlik Community

QlikView App Development

Discussion Board for collaboration related to QlikView App Development.

pradosh_thakur
Honored Contributor II

bat file not getting executed when qvw reoad through qmc

hi

i am trying to run a batch file through script with command

EXECUTE cmd.exe /C "D:\Qliktech\Qlikview\file_path\test.bat"


the bat file when run manually by double clicking works fine but when reloaded via qmc the task does not get finished(i have waited for 50 mins) and in the log file the execute command is also not appearing and it is stopping after the variable declaration. i have nothing but the execute command in the document. if i comment out the execute command the qvw run successfully within seconds.

1: under scrpts->settings -> can execute external programm checked

2: setting -> user preferences-> security-> all tabs checked

3: settings-> document properties -> admin override security checked

please advice.

regards

Pradosh

Learning never stops.
10 Replies
stabben23
Honored Contributor

Re: bat file not getting executed when qvw reoad through qmc

Hi,

does the qmc service account have rights to read the test.bat file?

When you double click on it, its Your account who runs the bat file.

stabben23
Honored Contributor

Re: bat file not getting executed when qvw reoad through qmc

Do you use Publisher or just server?

I you have Publisher, then you can Place the "D:\Qliktech\Qlikview\file_path\test.bat" in a command line execution, and then schedule this as a task instead of using it in a "empty" qvw.

pradosh_thakur
Honored Contributor II

Re: bat file not getting executed when qvw reoad through qmc

I confirmed with the admin and the SERVICE account does have the right to read the file.

Learning never stops.
pradosh_thakur
Honored Contributor II

Re: bat file not getting executed when qvw reoad through qmc

the file name is dynamic so it will change everyday. Can you point out why the execute command is not working ?

Learning never stops.
Partner
Partner

Re: bat file not getting executed when qvw reoad through qmc

Hi,

Is the user account running the QlikView Distribution Service member of the Local Security Policy "Log on as a batch job"?

Control Panel -> Administrative Tools -> Local Security Policy -> Local Policies -> User Rights Assignments

Have you set the "AllowExecuteCommand=1" in the Settings.ini-file for the QlikView server?

C:Windows\System32\config\systemprofile\AppData\Roaming\QlikTech\QlikViewBatch\Settings.ini?

//Johan

pradosh_thakur
Honored Contributor II

Re: bat file not getting executed when qvw reoad through qmc

Hi Johan,

the SA user is the admin so access is not an issue i guess.

"AllowExecuteCommand=1"  i have not set.

Learning never stops.
Partner
Partner

Re: bat file not getting executed when qvw reoad through qmc

Hi,

You may end up starting with C:\Windows\System32 as "home directory". Have you put fully qualified paths in the bat file?

Do set the AllowExecuteCommand in the settings.ini file and restart the distribution service for the setting to take effect. Also check the Local Security Policy. If you change it, restart the service.

Both of the above is needed for the EXECUTE to work.

pradosh_thakur
Honored Contributor II

Re: bat file not getting executed when qvw reoad through qmc

Hi Johan,

changed the settings.ini file and re started the services  still no help yet .. running the batch file from the publisher as of now as a task.. but i need the file to be dynamic so will love to get the qvw run the execute command. let me know if i have missed something.

i will let you all know the progress.

regards

Pradosh

Learning never stops.
pradosh_thakur
Honored Contributor II

Re: bat file not getting executed when qvw reoad through qmc

update:

1: double clicking on batch file does what it supposed to do.

2: Reloading the QVW manually running the batch file.(execute command)

3: running batch file as supporting task is not working.

4: reloading qvw from qmc is not running the batch(execute command)

Can anyone advice what could be wrong? rwunderlich‌ , pcammaert‌ , jontydkpi

Learning never stops.