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: 
Not applicable

Run macro from server

Is there any way to have the Enterprise Manager run a macro when reloading a QV-document? I've tried setting up running of this macro with Task Scheduler on Windows Server 2008 but I can't get it to run properly without myself being logged in. Also it requires my account to be associated with a developer-license which is also undesirable. I'd like it to just run from the server. Is this possible?

23 Replies
jerrysvensson
Partner - Specialist II
Partner - Specialist II

Check out this link

http://community.qlik.com/thread/37204

Solved our problems on windows 2008 server.

Not applicable
Author

Thanks for the Link, but it is not working anymore...

jerrysvensson
Partner - Specialist II
Partner - Specialist II

Strange, it worked before..

This was what helped us: We created the Desktop folder.

"

To work, Office needs a Desktop folder (why? ... good question!).

And on Windows 2008 there is no Desktop folder if you are not logged in, so you have just to create one and it will work fine !

- Windows 2008 Server x64

      Please make this folder.

      C:\Windows\SysWOW64\config\systemprofile\Desktop

- Windows 2008 Server x86

      Please make this folder.

      C:\Windows\System32\config\systemprofile\Desktop

Next, to run the macro I use this command: qv.exe /vParam=1 /NoSecurity App.qvw

But I don't know if the /NoSecurity flag is really usefull"

Not applicable
Author

Thanks for your answer, i will try out that. The /NoSecurity Flag is needed when you use macros in your qlikview documents. Qlikview will not ask if macros are allowed and will open the document without any questions.

Not applicable
Author

Hi Jerry,

your idea really helped me.Now the external Programm works.

My *.bat File looks like this:

"C:\Program Files\QlikView\qv.exe" /NoSecurity "D:\QlikView\Program.qvw"

One really important thing: The Admin-User on the QlikView Server must have a licence! Otherwise QlikView will open with the personal edition and is not able to trigger macros on Open...

Regards, Martin

arieidel
Partner - Creator II
Partner - Creator II

Thanks, dj-kalle.

I've been dealing with exactly this problem for a few days and the key was: the QV service user has to have a licence!

Also, I had to create a Supporting Task in order to execute then .BAT file because it wasn't working through a .QVW file with EXECUTE sentence.

koresaket
Contributor II
Contributor II

Hi Prasanna,

I've created a vbs script file which accesses the QV document data to format a mail body and sends a mail. The vbs works properly wen triggered via command prompt. However i tried to trigger the vbs script via a batch file using a supporting task. Though the supporting task runs successfully, it doesn't trigger the vbs. (I don't receive any mail.) Does supporting task do not support this types of operations?

Peter_Cammaert
Partner - Champion III
Partner - Champion III

Supporting tasks support whatever you throw at them.

However your conclusion (not triggered because I don't get any email) may not be entirely correct. There are many possible points of failure in a black box-setup like this.

Does your vbs script output any logging information?

koresaket
Contributor II
Contributor II

Hi Peter, Thanks for the quick response.

I tried with a different vbs script which creates a simple .txt file (This vbs script doesnt interact with the Qlikview document). And that went through successfully when triggered using Supporting task via a batch file.

However my mailer vbs script doesnt seem to to go through successfully. (Please note this vbs script does work fine when triggered via command prompt.)

Since the only difference between these two vbs scripts is that the latter interacts with the Qlikview document, i concluded that the supporting task doesnt not support this.

In your opinion, should the supporting task support this operation? I'll dig in further to check if there's anything else causing the vbs operation to fail.

Peter_Cammaert
Partner - Champion III
Partner - Champion III

Yes it should, but that depends on how you interact with your QlikView document. If you use QV Desktop to do something with a document, remember that QV Desktop requires a license, and the service account that is running the supporting task probably has none.