The "ExtnAction" Command |
This command can can be used within a "Extn" block. It defined an action to be associated with a "ProgId".
The command takes these parameters:
Parts of Windows will expand environment variables (like "%comspec%") while it won't work for others (and this varies by OS), if you need to use them then its best to use the format "[%comspec]".
This defaults to "EXTN_ACTION_COMMAND_TYPE (which is initially "STRING"), you would need to use "EXPSTRING" if the command includes environment variables (or they won't be expanded).
If you do use "EXPSTRING" then you will also wish to add this command:
<$MsiValFilter "Default types must be REG_SZ on Win95 Systems">
Note that if the "ProdId" (aka "FType") is too long (whatever that is) the item will display in the "New" menu but the icon won't display.
You must also have at least one other action where "NewMenu=N" otherwise Windows will not display the item at all. The "TryMeExtnAction.MM" example demonstrates this.
Main Extn/ExtnAction Related Options |
Please see the "options for commands" section of the manual.
#define? EXTN_DEFAULT_PROGID_PREFIX ProgId4. #define? DEFAULT_EXTN_HKEY CLASSES_ROOT #define? EXTN_ACTION_COMMAND_TYPE STRING ;;or EXPSTRING (to expand environment variables etc)?
EXAMPLE |
Also see the "TryMeExtnAction.MM" example.
<$Component "TestExtnMacro" Create="Y" Directory_="INSTALLDIR"> <$Extn ".TestExtn" KEYPATH="Y" Description="Test Extension"> <$ExtnAction Key="Open" Description="EDIT FILE" Command=^notepad.exe "%1"^> <$/Extn> <$/Component>