Each shared menu settings file is saved in a separate .ini files stored on a shared drive or folder. Each user can add a shared menu as for other menus using the Add Favorite button. The info about the added shared menu is stored in the user's QuickAccessPopup.ini file in a line like this:
Favorite1=External|HR Menu|> HR Menu|C:IconsJLicons.dll,42||C:SharedMenusHR_Menu.ini||||||||0||||||
Anatomy of a shared menu settings file
Users having access to the shared menu ini file on a network drive or shared folder (Dropbox, etc.) can manage the shared menu in a text editor. They can also be generated from an external data source. If you edit or generate a settings file, make sure its content is fully compliant with the QAP structure because little or no validation is done when QAP loads a settings file. QAP assumes that the settings file contains valid data as if it was saved by itself.
The shared menu settings file itself is composed of three sections:
- [Global]: information about the menu
- [Favorites]: the list of favorites shared in this menu
- [Favorites-backup]: a backup of the favorites as they were before the last time the shared menu was saved
Here is an example of a shared menu. Its content is detailed below.
MenuName=HR Resources Menu
WriteAccessMessage=Please contact Mary at HR for suggestions about the HR shared menu.
The shared favorites are listed in the [Favorites] section in the order they are saved and loaded by QAP. The details of the favorites structure is the same as for the user's QuickAccessPopup.ini file. You can find more info about the favorites in a settings file here: What is the structure of QAP settings (ini) file?
The content of the [Global] section depends on the type of shared menu. The four first values are common to all types of shared menus:
- Personal (default)
The shared menu name is shown in various dialog boxes and used as default name when user adds the shared menu from the Shared Menus Catalogue.
The last modified date-time is used to detect if a shared menu file was modified by another user since QAP was loaded. This prevents the user to edit the menu based on an older version of its content. Last file modification date-time of the shared menu ini file is taken from the file system and is independent from various user's clocks or time zones. It is stored in the "yyyymmddhh24miss" format (more info in AHK documentation). Of course, the date-time being written to the file right after its modification, the real file's date-time can be a few milliseconds after the value saved in the file without impacting the conflict protection. The file modification date-time in the ini file is updated only when changes are done to the content itself (shared favorites), preventing reservation/release actions modifying the file's date-time without real modifications in the content to prompt for an unrequired reload. This value should be updated if the content of the shared menu file is changed outside QAP by an administrator using a text editor or by an automatic process.
This value is used to track current editing of a shared menu. It contains the Windows logon name and computer name of the user currently editing the shared menu (you can find the current user's logon name in the QAP About dialog box). If this value is empty, the menu is not currently reserved. When the user who reserved the menu saves or cancels his changes to the Settings, or quits QAP, the value of MenuReservedBy is erased, releasing the shared menu. This value can be erased manually by an administrator if, for any reason, a file is locked by a user who could not access the file using QAP. This value is critical to collaborative shared menus where the risk of simultaneous editing is more likely to occur. But it is also used to alert a personal shared menu user if the menu was left unsaved on another PC and to alert administrator of a centralized menu if another administrator is currently editing the menu.
The last two values are specific to Centralized shared menus:
Only users listed in this value can edit a centralized shared menu. Enter one or multiple Windows logon names, separated by coma. Note: of course, any user having write-access to the shared menu settings file itself could edit it using a text editor.
This is the message displayed to user having only read-only access to a centralized menu when they try to edit the menu. It can be used to direct the user to the menu administrator.
Personal shared menu example
MenuName=My Personal Menu
Collaborative shared menu example
MenuName=Team Shared Menu
Centralized shared menu example
MenuName=HR Toolkit Menu
WriteAccessMessage=Please forward suggestions to Peter, Paul or Mary.