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: 
pradosh_thakur
Master II
Master 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.
11 Replies
stabben23
Partner - Master
Partner - Master

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
Partner - Master
Partner - Master

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

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

Learning never stops.
pradosh_thakur
Master II
Master II
Author

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

Learning never stops.
johanlindell
Partner - Creator II
Partner - Creator II

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

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.
johanlindell
Partner - Creator II
Partner - Creator II

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

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

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.