AveDesk Installer: Action types
This file will give an overview of all the types that can be used in the Action-section's (BeforeCopy, AfterCopySucceeded, AfterCopyFailed) of an AveDesk Installer XML file.
NOTE: Silent Installs
A user can choose to install a package silenty, in this case all actions that will display something to the user will not be done. For example, the ShowBitmap action will not be done if the install is done silently.
Also, packages that are automatically downloaded and installed will always install silently.
NOTE: Aliases
All files that should be described by Directory/File-nodes, can also be described with an Alias. An Alias must be set in the CopyInformation-section and will always map to a file on the users harddisk. You can use an Alias in an Item by adding the Alias="true" attribute to the Item-node and simply set the Alias' name as the Item-node's Text.
Example:
<Item Type="RegisterCOMServer" UseAlias="true">SomeDLL</Item>
RunScript
This action will launch an external 'script' or file. The filename must be in the Text of the node and is always relative to the root of the ZIPped package. Consequently, you cannot run a file from the users harddisk.
<Item Type="RunScript">Scripts\RegisterLibraries.bat</Item>
ShowBitmap
This action will show a bitmap as a splash-screen. The filename must be in the Text of the node and is always relative to the root of the ZIPped package. Consequently, you cannot show a bitmap from the users harddisk. The user will be able to click the splash-screen away or the splash-screen will be automatically hidden after 10 seconds.
This action will not be performed if an installation is silent.
<Item Type="ShowBitmap">About.png</Item>
LoadDesklet
This action will load a desklet. The desklet's information must be a child-node as saved in .avedesklet files. The first child-node should be Desklet. The only mandatory child-node of the Desklet-node is the DLL-node. All other child-nodes, suchs as Label, OwnerSettings are optional.
<Desklet>
<DLL>desklets\avetunes\ituneswidget.dll</DLL>
</Desklet>
RegisterCOMServer
This action will register a COM-server. The COM-server should be copied to the users harddisk before and thus will be described with Directory/File-nodes or with an Alias.
<Item Type="RegisterCOMServer">
<Directory BaseFolder="Desklets">
<Directory Name="SomeDesklet">
<File>COMstuff.dll</File>
</Directory>
</Item>
ShowMessage
This action will show a message to the user. The message will have a Caption- and a Text-part. The caption should be the Text of a Caption-childnode, whereas the Text should be the Text of a Text-childnode.
<Item Type="ShowMessage">
<Caption>Failed</Caption>
<Text>The installation failed.</Text>
This action will register a COM-server. The COM-server should be copied to the users harddisk before and thus will be described with Directory/File-nodes.
<Item Type="InstallModule">
InstallModule
This action will install an AveDesk Add-on module. The module must be described with Directory/File-nodes or with an Alias.
<File>SomeModule.dll</File>
UnloadModule
This action will unload a Module and thus make it possible to update the physical DLL file on the users harddisk. You typically use this action in the BeforeCopy-section. The module must be described with Directory/File-nodes or with an Alias.
<Item Type="UnloadModule">
DownloadAndInstall
This action will download and install another AveInst-package. The file to be downloaded and installed must be described with a DownloadableFile-node.
<Item Type="DownloadAndInstall">
<DownloadableFile>
<URL>http://mpj.tomaatnet.nl/nolabel.aveinst</URL>
</DownloadableFile>
SuspendDesklet
This action will suspend a desklet and thus make it possible to update the physical DLL file on the users harddisk. You typically use this action in the BeforeCopy-section. The module must be described with Directory/File-nodes or with an Alias.
A suspended desklet will stay unloaded as long as the installer is running. The desklet will automatically be resumed if the installer stops.
<Item Type="SuspendDesklet">
<Directory Name="AveTunes">
<File>iTunesWidget.dll</File>
DoIf
This action will perform another action, but only if some requirement is met. A common usage is to only use the LoadDesklet action to load a desklet if a desklet of the same type is not already running.
The structure of this actions is as follows:
<Item Type="DoIf"> <If Type="RequirementsType">
<!-- .... -->
</If>
<Then Type="ActionType">
</Then>
<Else Type="ActionType">
<!-- ... -->
</Else>
If the Requirement in the If-node was met, then the Action in the Then-node will be performed. Otherwise, the Action in the Else-node will be performed, if available (thus Else is optional).
<Item Type="DoIf">
<If Type="Not">
<Item Type="DeskletIsUsed">
<File>
...
wegieldaniel