Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
udaya_kumar
Specialist
Specialist

how to execute bat file in qlikview server (qmc)

Hi,

I tried executing bat file in the external programs in the supporting task in system tab.

but am not able to run the task, task is failed.

i gave like

"C:\Documents and Settings\SVC-QVEDX-D\Desktop\testrun.bat" in command line statement in the task.

and inside the bat file, i gave "cscript C:\Documents and Settings\SVC-QVEDX-D\Desktop\sample.vbs". but

i am getting error when i run this bat file that

"C\Documents and Settings\SVC-QVEDX-D\Desktop" the path specified not found.

so what could be the problem?

13 Replies
jonathandienst
Partner - Champion III
Partner - Champion III

Hi

These are the things I would look at:

Does the service account have access to the C: drive?

Are you using a mapped drive in your bat file?

Does the bat file run succesfully if you manually run it from a CMD prompt?

Can you "runas" the bat file successfully from the CMD prompt?

Regards

Jonathan

Logic will get you from a to b. Imagination will take you everywhere. - A Einstein
vgutkovsky
Master II
Master II

Since you have 2 servers, you need to specify the UNC path when executing the BAT file. When Server 2 calls the C: drive, it's trying to call its own C: drive. For simplicity, even use the UNC path when executing from Server 1. If the service account on both servers is an administrator on the servers, you'll be able to use the admin $ share without having to explicitly share out a folder. Under supporting tasks, the BAT file should be referenced as:

" \\server1name\c$\Documents and Settings\SVC-QVEDX-D\Desktop\testrun.bat " (no spaces before or after the quotes)

Inside the BAT file, specify the VBS command as:

cscript " \\server1nam\c$\Documents and Settings\SVC-QVEDX-D\Desktop\sample.vbs " (no spaces before or after the quotes)

Vlad

udaya_kumar
Specialist
Specialist
Author

Hi Jonathan,

Does the service account have access to the C: drive?

Are you using a mapped drive in your bat file?

Does the bat file run succesfully if you manually run it from a CMD prompt?

Can you "runas" the bat file successfully from the CMD prompt?

I have given the access to C drive for the service account.

no, its not a mapped drive.

yes, bat file run successfully, when i run it manually from cmd prompt

yes, i can use runas and run the bat file from the cmd prompt

jonathandienst
Partner - Champion III
Partner - Champion III

Hi

I would try with the service account in the administrator's group (just for test purposes - don't leave it a member of administrators when done!!). If it then works properly, you have a permissions problem somewhere. Try the batch file one line at time (REM out the rest) and see if you can determine which command is failing.

Regards

Jonathan

Logic will get you from a to b. Imagination will take you everywhere. - A Einstein