QlikTip #19: Suppressing Macro-Security (Module Security) Dialog on QlikView-Server/QlikView-Documents

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):

The module script in this document contains code that accesses the system or applications outside QlikView. What security level do you want to give the macro module of this document.

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!

Bookmark and Share

. Bookmark the permalink. Both comments and trackbacks are currently closed.

19 Comments