<< Click to Display Table of Contents >> RayPack > 7.3 u6 > User Guide > PackDesigner > MSI / MST / RPP Based Projects > Visual Designer Mode > System Interaction > Context Menu Add a Context Menu |
In order to add a context menu to a packaging project, users go to the context menu view of the Visual Designer mode.
With a click on the Create new... button, and the selection of the Create context menu entry option, the wizard for object creation is invoked.
Work your way through the steps of the wizard to define all required properties for the new object.
At any time, using the Next or Back buttons, which are displayed at the bottom of the wizard dialog, allows to navigate within the already processed steps.
To exit the wizard without creating a new object, use the Cancel button, also located at the bottom of the wizard dialog.
One of the mandatory properties of a context menu item is the file extension it has to be applied to. Therefore, this first wizard step cannot be skipped, or finished successfully without a valid file extension object in place. The combination of file extension and verb has to be unique within a packaging project, therefore it is possible to create several context menu items for the same file extension object, but impossible to create a new context menu item with the same verb and file extension values.
If there are no file extension objects available yet, this step shows a link to the wizard for file extension item creation. Click on Add new extension to call the wizard and prepare a file extension first. As soon as the file extension wizard is finished, the current view of the context menu creation wizard is updated. The newly created file extension object is already selected as extension for the context menu.
If more than one file extension is stored within the current packaging project, each file extension is represented by a separate tile. Users have to click on the tile of the desired file extension to mark it, and relate it to the new context menu object. Please note that the currently selected tile has a different background color and has a check mark icon in its upper right corner.
In this step users can choose whether to use a custom verb by manual definition, or to select a predefined one from the standard repository. The manual option is active by default. To activate the predefined option, click on the radio button selector in front of the predefined control label. As soon as one option is active, the other option becomes inactive.
Each context menu item needs to have a verb, therefore it is not possible to proceed without any selection or manual verb definition. Please note that the combination of file extension and verb must be unique. Therefore it is not possible to proceed until a unique combination is established. Hover over the input controls to reveal the tool tip with hints on how to solve the issue that prevents the wizard step from being valid.
Predefined verbs are localized automatically, whilst manual (also called custom) verbs cannot be localized on the fly.
Internally, verbs are stored as text values, and therefore may include alphanumerical signs and special characters. However, from a logical system perspective, verbs are commands which are interpreted by the shell extension, and thus have to follow some basic format guidelines:
•Custom verbs have to be interpretable according to the target application
•Verbs may not include special characters or blanks
This step is designed to define the command that is displayed as context menu item on the target machine, as well as the sequence index of the current object.
Command
The command term is a localizable string, which can include properties and other variable contents of the packaging project. As indicated by the square brackets ("[]") at the right hand side of the input control, syntax suggestion is activated for the command string. Simply enter an opening square bracket ("[") to invoke the suggestion feature and see possible options.
Sequence
The sequence value is an integer that is used to order the context menu items per file extension. The context menu items are ordered ascending towards their sequence value. The one with the lowest value is automatically defined as default item.
Both, command and sequence can be left empty. The interpretation results will then depend on the shell extension on the target machine.
The command sent to the target machine may include arguments. The most commonly used is "%1", which represents the file name. An additional, though used less often, is "%2", which represents the name of the default printer specified for the target system.
Additional custom parameters may be added, but have to be handled with care: It is possible to use properties (applying the typical notation with square brackets (e. g. "[MyProperty]"), but the resolution of actual run time values can only be executed successfully when the installation sequence has already processed the property translation at the very moment when the component which contains the context menu item is installed.
As indicated by the square brackets ("[]") displayed on the right hand side of the input control, the syntax suggestion feature is enabled for the command input.
Use the summary page to check the correctness of the object properties that were defined during the previous wizard steps.
•If all properties are set as required, click Process to finally create the item.
•If changes are due, click Back until the wizard step with the incorrect property definition(s) is displayed and make modifications as required.
Please note that changes in an early step may lead to different defaults or options in any later step. Therefore, please verify that all steps contain the desired settings whilst NEXTing to the summary page again.
Once the new context menu has been created, the wizard can be closed by using the Finish button at its lower right corner. The context menu view is updated, and the list of existing objects contains the newly created item visible and editable.