Dynamically adding files using wildcards

book

Article ID: 179687

calendar_today

Updated On:

Products

Symantec Products

Issue/Introduction

 

Resolution

Question

The source directories in an installation may have files that change from one compilation to another. Can I add files from a directory dynamically using wildcards with WiseScript?

Answer

The Install File(s) and Copy Local File(s) Actions both allow wildcards in the source path.

Using Install File(s) script action

  1. Open your .wse project in Wise Installation System or the WiseScript Editor tool in Wise Package Studio.
  2. Click on Script Editor in Wise Installation System or Setup Editor in WiseScript Editor.
  3. Select a location in the Installation Script to add an Install File(s) Action and double-click the Install File(s) action from the list of Actions. The Install File Settings dialog appears.
  4. In the Source Pathname field, enter the path to the directory containing the source files, ending with \*.* to include all files in the directory. Use other wildcards, such as *.exe or *.txt to only include a particular file type.
  5. Fill in the remainder of the fields on the Install File Settings dialog as desired, and click OK.

Using Copy Local File(s) script action

  1. Open your .WSE project in Wise Installation System or the WiseScript Editor tool in Wise Package Studio.
  2. Click on Script Editor in Wise Installation System or Setup Editor in WiseScript Editor.
  3. Select a location in the Installation Script to add a Copy Local File(s) action and double-click the Copy Local File(s) action from the list of Actions. The Install File Settings dialog appears.
  4. Use wildcards in the Source field and the Local Path field:
    1. Use a wildcard in the Source field:
      • In the Source field, enter the path to the directory containing the source files, ending with \*.* to include all files in the directory, for example %INST%\MyDir\*.*. Use other wildcards, such as *.exe or *.txt to include a particular file type.
    2. Use a wildcard in the Local Path field. Entering a path in the Local Path field ensures the progress bar updates accurately at installation runtime.
      • In the Source field, enter the path to the directory containing the source files, ending with a backslash '\', for example %INST%\MyDir\.
      • In the Local Path field, enter the full path to the directory containing the source files, ending with \*.* to include all files in the directory, for example C:\MyDir\*.*. Use other wildcards, such as *.exe or *.txt, instead of *.* if appropriate.
  5. Fill in the remainder of the fields on the Copy Local File(s) Settings dialog as desired, and click OK.