Working with file properties | |
This feature lets you specify custom properties for each file of the package: custom destination folder, conditional variable and file action-options. Accessing to the file properties editorFirst you need to open the file manager (by pressing CTRL+F for example). Then in the list select the file you want to edit the properties of, and finally press the Properties button to show the editor. You can both edit the properties of a single file or a group of files.
Here is a screen shot of the file properties editor:
Where to extract the selected file(s)?You can use this field to specify the path to the target folder for the extracted file. If you leave this field blank, the package will unpack the file into the default destination folder or in the corresponding sub-folder if the directory structure is stored into the archive (see the warning below).
For example, you can select your shared .DLL files and set their destination folder to %SYS% which refers to the System folder. On the screen shot, the selected files will be unpacked to %COMTEMPLATESDIR%\The templates.
Any path variable can be used; there is a lot of possibilities. For example, you could read the destination path from the Registry in a variable using a custom action, and then use that variable as the target folder. Is there a condition to extract the selected file(s)?In some cases you may need to control whether a given file should be extracted or not. For example, if a shared file is missing on the destination computer or in the case you want to install the registered version of your product only if the user has entered the correct registration key... It is possible to decide at runtime whether a file can be extracted or not. It requires you to associate a variable called Conditional Variable to the file. Thus the file will be extracted or not, depending on the value (Boolean type) of its conditional variable.
Before extracting this file, the package will evaluate the value of the associated conditional variable (if any): if its value is set to "0" (false), then the file is ignored. Now you need to add an action (generally "Perform operation on a variable") to the custom action list (and before the file extraction phase of course) that sets the value of the conditional variable: if the value is equal to 0, then the file will not be extracted. Otherwise it will be unpacked.
Component Variables and Conditional VariablesIf files are belonging to a component, then their extraction may depend on the value of the component's variable. If you use the two features (both components + conditional variable) they may interfere: that's why it was decided that conditional variables outclasses the component variables. Suppose that we have a file belonging to a component and associated to a conditional variable. For example, the component variable is set to 0 (false): if the conditional variable is set to "1", the file will be extracted. See this diagram:
File ActionsAlthough all of the following actions may be easily performed with custom actions (and with more control over the result), you can still use the file properties to gain time, especially if you have huge file lists.
Turn on this option to cause the package to register the selected file (it must be an executable or DLL file!).
Turn on this option to cause the package to indicate that the file may be shared by several applications, and therefore should not be removed if still used.
This option is useful only if you include an uninstaller for the package. By default the uninstaller will remove any file extracted by the package (except if it was marked as shared). If you do not want the uninstaller to remove the selected file(s), then activate this option.
|
Paquet Builder Help - Copyright © G.D.G. Software. All rights reserved.