The optional Instructions XML file you create provides Package Manager with instructions for customized execution of package installation.
Name the instructions XML file instructions, omit the file extension, and place it in the root of the data directory of a File package.
The following text is an example instructions file for a File package.
<instructions> <targetAttributes bitness="64" readOnly="allReadOnly"/> <shortcuts> <shortcut> <destination root="Desktop" path="myShortcut.lnk"/> <target root="Program Files" path="Shortcuts\executable.exe"/> </shortcut> </shortcuts> <customExecutes> <customExecute root="Documents" exeName="executable.exe"/> </customExecutes> </instructions>
The <targetAttributes> element provides optional instructions regarding locations where Package Manager installs files on the target system.
<targetAttributes> is an empty element, meaning that it has attributes, but does not contain elements or text content. It has the following attributes:
The <shortcuts> element provides a list of shortcuts that Package Manager creates during installation.
<shortcuts> contains the <shortcut> child element.
The <shortcut> element defines one shortcut that Package Manager creates during installation.
The <destination> element specifies the location where Package Manger creates a shortcut file.
<destination> is an empty element, meaning that it has attributes, but does not contain elements or text content. It has the following attributes:
Attribute Name | Type | Value | Examples |
---|---|---|---|
root | String | Any supported installation root target. | <destination root="Startup" path="testShortcut.lnk"/> |
path | String | The path and file name appended to the root target. | <destination root="ProgramFiles" path="Shortcuts\test.exe"/> |
The <target> element specifies the location of the file for which Package Manager creates a shortcut.
<target> is an empty element, meaning that it has attributes, but does not contain elements or text content. It has the following attributes:
Attribute Name | Type | Value | Examples |
---|---|---|---|
root | String | Any supported installation root target. | <target root="Startup" path="testShortcut.lnk"/> |
path | String | The path and file name appended to the root target after it is resolved. | <target root="ProgramFiles" path="Shortcuts\test.exe"/> |
The <customExecutes> element provides a list of custom actions for Package Manager to perform on the package.
<customExecutes> contains the <customExecute> child element.
The <customExecute> element defines one custom action Package Manager performs on the package.
The <customExecute> element is optional in the Instructions file, but you can include as many as needed for your package.<customExecute> is an empty element, meaning that it has attributes, but does not contain elements or text content. It has the following attributes:
For Instructions files in which you include a <customExecute> element where schedule="postall", Package Manager demonstrates specific behaviors that may affect package installation.
The postall value instructs Package Manager to run the executable after completing the installation and/or removal steps for all packages.