Skip to main content
Announcements
Join us at Qlik Connect for 3 magical days of learning, networking,and inspiration! REGISTER TODAY and save!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Password protected shared drive access through QV Script

Hi,

I have quite a few files in my shared drive/path that are to be read. Please note that this shared drive is in another Windows server. This drive is password protected.

Is there any way I can embed the credential in QlikView script to access files in this shared path?

Thanks!

1 Solution

Accepted Solutions
marcus_sommer

I think you will need to mount this storage before you could access it with qlikview. Maybe you could use a batch-file like this:

IF NOT EXIST T: net use T: \\YourServer\d$  /User:YourUser YourPassword


- Marcus

View solution in original post

7 Replies
marcus_sommer

I think you will need to mount this storage before you could access it with qlikview. Maybe you could use a batch-file like this:

IF NOT EXIST T: net use T: \\YourServer\d$  /User:YourUser YourPassword


- Marcus

Not applicable
Author

Thanks Marcus! I mounted the drive and now I can access it in my Script. I can read files from there. Only problem is I am not able to store through Script in that location.

I think that is related to 'Write Permission' and system admin will take care of that.

marcus_sommer

Yes this will be a matter of the permissions. But you should consider not to store data there else on the local drive from the qv server then most often are local storages a lot faster then the network.

- Marcus

dgreenberg
Luminary Alumni
Luminary Alumni

Why can't you grant permission to the service account used by QlikView?

This way you don't have to fool around with passwords and mounting drives just grant RW permission to the QlikView service account.

marcus_sommer

That's not always so easy and you might need to ask the IT for it which needs by us some efforts and a uncertain amount of time. Further you might need also to be able to load manually with the desktop client by using your own account.

Therefore it's easier for me to use various batches which mount, read, copy and synchronize and so on things between production and development environment, our network storages and storages from other companies our group. This meant I need in anyway a bunch of batches and to include checks on which machine it runs and which drives are available and so on isn't much effort. Further if necessary the things will be done per runas:

runas /user:YourUser /savegred "D:\ DataSynchronisation.bat"

- Marcus

dgreenberg
Luminary Alumni
Luminary Alumni

Marcus - just because it's easy doesn't mean it's a best practice

The best practice is to use service accounts and control access that way.

Many companies would consider it a significant security violation to not use Windows Authentication and instead use a username and password which could be shared, read as clear text from your batch file and so on.

Not sure why you would need a runas if the QlikView service account has the appropriate permissions.

Not starting a flame war, just expressing an opinion.

It's easier not to backup

It's easier not to use source control

It's easier if the developers can put files directly on the production servers

It's easier not to document

It's easier not to use comments when needed

I did or didn't do  it because it's easier is something a boss never wants to hear.

marcus_sommer

Of course, you are right - it's far away from best practices and I'm sure if we would have more support from the management and the IT we would have other solutions for this and probably by some more other topics. I'm not sure if I will ever see that in my company.

- Marcus