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!
Possibly related posts:
- QlikView 9 – Überblick über Server und Publisher
In der Version 9 von QlikView gibt es einige Neuerungen im Layout, einige neue Controls, die wirklich grosse Änderung hat jedoch serverseitig bei QlikView Server und QlikView Publisher stattgefunden, da ist kaum ein Stein auf... - QlikTip #1: Transferring Current Selections to Excel-Export (translated)
While driving this blog only in German the most viewed article was “QlikTip #1 – Export the current celections to Excel”. So this will also be the first article translated to English. (The original German... - QlikTip # 18: A workaround for passing parameters to QlikView-macros
When calling macros from the user interface you cannot pass a parameter to the function called in QlikView. This behavior is quite annoying …! But the workaround explained here will show you a possibility how... - QlikTip #17: Simulating the $(include) command in QlikView macros
Within load-scripts in QlikView there is the useful “$(include)” command available for including files containing some script to be used within the load-script. Doing so it is easy to encapsulate and reuse some code used... - QlikTip #1: Statusbox/Auswahlstatus in Excel-Export integrieren
Wie kann man die aktuelle Auswahl der Statusbox bei einem Excel-Export ebenfalls nach Excel exportieren. Dieser Artikel zeigt, wie dies nicht nur lokal sondern auch über den QlikView Publisher funktioniert....


Mag. Stefan WALTHER
6 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!