When opening documents with macros the end-user will be shown a dialog to define the desired macro-security/module security (in the QlikView Windows Client or the QlikView IE Plugin):
But what, If you do not want that the end-user has to option to select the desired macro security/module security?
You can (e.g. as a system-administrator) globally enable the module-security at the highest level (“Allow any Macro (only for trusted documents)”) for every QlikView-Server you have by running the following script.
This script adds a registry entry to HKCU\Software\QlikTech\QlikOcx\Settings for Qlikview Servers\:
'// **************************************************
'// Script for adding some registry keys to the current user profile/registry settings
'// for enabling the macro security/module security for the SERVER defined below
'// ~
'// CONFIGURATION
'// Just configure the script by defining your server below
'// ~
'// The article explaining this script can be found at
'// http://www.qlikblog.at/523/
'// **************************************************
CONST cSERVER_NAME = "YOUR_SERVER_NAME"
Dim WshShell 'as Object
Set WshShell = WScript.CreateObject("WScript.Shell")
WshShell.RegWrite "HKCU\Software\QlikTech\QlikOcx\Settings for Qlikview Servers\", 1, "REG_SZ"
WshShell.RegWrite "HKCU\Software\QlikTech\QlikOcx\Settings for Qlikview Servers\Module Script System\", 1, "REG_SZ"
WshShell.RegWrite "HKCU\Software\QlikTech\QlikOcx\Settings for Qlikview Servers\Module Script System\ " & cSERVER_NAME, "", "REG_SZ"
That’s it!
By doing so the end-user will never be asked again to choose the desired macro-security/module security.
You could for example run this script together with other logon scripts, it does not matter if you run this script multiple times!


Stefan WALTHER
11 Comments
Question, about tip #19, do I have to include this script in every single qlikview document I publish in my server?
Hector
Hi Hector,
no, this is a misunderstanding!!!!
The script posted in this article is not to be used in QlikView-files!
This is a script for adding some settings (keys) to the windows-registry!
Maybe I have not mentioned this clearly in the article:
You have to save the content in the script to a .vbs-file, then you can execute the file and the keys will be added to the registry.
Before executing the VBScript-File do not forget to change the constand SERVER_NAME to your server!
Hope this helps!
Best regards
Stefan
Hi Stefan,
do you also know a way to suppress the dialog when using OCX Clients?
I seems to me that when using OCX as Client the “Always use this …” Option dosen’t work also.
Best regards
Helmut
Hi All,
I’m looking for how do add user and setup security in Qlikview server.
koff
Is there a way to undo this setting? A backout plan in case somehow this change to the registry negatively affects the QlikView environment.
Also, is the effect immediate or is a Server service restart needed?
Thanks for posting this!
Tyler
great post as usual!
Hi,
Our users do not have administrator rights on their machines( no access to regedit). If on the first opening of the document, the user chooses the wrong option, is it possible to reprompt this pop-up that defines the security level of macros?
Regards,
CL
HI Corine,
just have a look at the section “User Allowed Security Level” in QlikView’s Reference manual.
Regards
Stefan
Stefan,
The “User Allowed Security Level” reference in the QlikView Reference manual does not mention any way to change this setting on Access Point (it just tells you how to set it in the Edit Module box of the qvw). If the end user has accidently chosen the wrong setting while using the document through Access Point, is there a way to reset their settings?
Is there a way to suppress the dialog box on a qvw to qvw basis? We have a macro to export some data to a CSV file in the user’s MyDocuments folder, but if they chose the wrong option from the above dialog box they lose that functionality.
Thanks,
Brian
Yes, theres is a way to change the security settings: use Control+Shift+M to access the module security dialog.
For all combination and dependencies of settings influencing the security dialog I’ll prepare an article with some details …
Regards
Stefan
What’s just about using this script as a windows logon script with other security permissions than the current user; that’s really the purpose of this article.
Regards
Stefan