
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Batch File to Load an Application Containing Password
Hello everyone...
I built a batch file to load a QlikView app, but the app needs a user and password to be open. Due to this constraint my batch file does't work. Here is the batch file writing:
"C:\PROGRAM FILES\QlikView\qv.exe" /r "BI-Gerentes.qvw"
How can I put the user and password at the command line of my batch file to overcome that issue?
Any suggestion is going to be welcome !!!
Giovane
Accepted Solutions


- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Just with a normal command-line it's not possible. But you could use RUNAS to start a batch with your wanted user and this batch starts then your qlik-batch. An alternatively would be to use vbs macros/batches for this kind of task because the open-statements provides parameter to add an user + password. Here an example: Vbs-script-execution-not-working-properly to the logic. More background and examples could you find within the APIGuide.qvw.
- Marcus


- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I believe that there isn't an argument in the command line for section access protected QVWs.
My suggestion is for you to include the user login in the Section Access.


- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Just with a normal command-line it's not possible. But you could use RUNAS to start a batch with your wanted user and this batch starts then your qlik-batch. An alternatively would be to use vbs macros/batches for this kind of task because the open-statements provides parameter to add an user + password. Here an example: Vbs-script-execution-not-working-properly to the logic. More background and examples could you find within the APIGuide.qvw.
- Marcus

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello, Fosuzuki...
What do you mean [...] include the user login in the Section Access? How could that solve my issue?
Thanks a lot.
Giovane


- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Giovane,
The QlikView app asks for a user/password because it has security embedded in it, via Section Access. If your user is not listed in it, it will ask for a valid credential. My suggestion was for you to include your user inside the Section Access configuration, so that it doesn't ask for the user/password.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi, Fosuzuki...
At the lines below you can see my security schema. Could you show me how your suggestion would run to overcome my issue, please?
Section Access;
LOAD * INLINE [
ACCESS, USERID, PASSWORD, VD, VD1
ADMIN, ADMIN, ADMIN!@#,
USER, FLORIPA, GerFlo!@#, FLO, GEL
USER, NORTE, GerNor!@#, NOR, GEL
USER, CRICIUMA, GerCri!@#, CRI, GEL
USER, TOTAL, GerMaster,
];
Section Application;
ReducaoRegiao:
LOAD * INLINE [
VD, Regiao
FLO, Florianópolis
NOR, Joinville
CRI, Criciúma
];
ReducaoProduto:
LOAD * INLINE [
VD1, SUBGRUPOS.DESCRICAO
GEL, GELO
GEL, GELO
GEL, GELO
];


- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Try adding your domain\username to the section access table. When using domain users, you can leave the Password as "*":
LOAD * INLINE [ ACCESS, USERID, PASSWORD, VD, VD1 ADMIN, ADMIN, ADMIN!@#, USER, FLORIPA, GerFlo!@#, FLO, GEL USER, NORTE, GerNor!@#, NOR, GEL USER, CRICIUMA, GerCri!@#, CRI, GEL USER, TOTAL, GerMaster, ADMIN, myDomain\myUser, *, ];

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi, Marcus...
Based on your clue I found a way to overcome the user and password required to access the .qvw file by the batch.
Thank you for your cooperation.
Giovane

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello, Fosuzuki...
Thanks for your tips. Finally I followed the tip gave by Marcus and created a way to pass the user and password required by the .qvw file, at the moment the batch file call it.
Thanks a lot.
Giovane
