6.8 Action - Edit Text File

The Action - Edit Text File dialog box lets you specify a file and configure the list of changes to be performed on the file. You can also create a file, if one does not exist. You can also specify the specific requirements that a device must meet for the action to be executed on the device.

Figure 6-9 Action - Edit Text File Dialog Box

Action - Edit Text File Dialog Box

To access this dialog box in ZENworks Control Center, click the Bundles tab. Click the underlined link of a bundle in the Name column of the Bundles list, click the Actions tab, click one of the action set tabs (Distribute, Install, Launch, Verify, Uninstall, Terminate, or Preboot), click the Add drop-down list, then select an available action.

The following sections contains additional information:

6.8.1 General

The General page lets you specify a file and configure the list of changes to be performed on the file. You can also create a file, if one does not exist.

Filename

Specify the file that you want to change. For example, ${SystemDrive}\Program Files\myfile.txt.

File Backup(s) to Retain

Specify the number of backups of the text file to retain. The default is 5 backup copies, but you can specify any number between 1 and 25. When the number of backup copies of the file exceeds the number specified here, the oldest backup file is overwritten.

Encoding

Specify the encoding that you want to use:

  • Auto detect: Use the encoding used in the original file that you specified in the Filename field. This is the default option.

  • ASCII: Use ASCII encoding.

  • Unicode: Use Unicode* encoding.

  • UTF-8: Use UTF-8 (8-bit UCS/Unicode Transformation Format) encoding.

File Operation > Specify Contents of the File

Use this option to specify the contents of the text file.

  • Import Contents from an Existing File on this Device: Browse to and select the text file from which you want to import its contents.

  • Contents of the File: Specify the contents of the newly created file.

  • Create File, If Does Not Exist: Specify whether you want to create the file specified in the Filename field, if it does not exist. If this option is selected and Encoding is set to Auto detect, the file is created in UTF-8 format with the same name and the extension as specified in File Path.

File Operation > Specify Changes to the File

Use this option to specify the changes to the text file.

  • Change List: Specify the changes that you want to make to the text file. Click Add to open the Add a Change dialog box, fill in the fields, then click OK. Click the Help button for additional information.

    You can edit or remove an entry, or you can use the Move Up and Move Down buttons to order the list. The changes to the file are made in the order listed.

  • Create File, If Does Not Exist: Specify whether you want to create the file specified in the Filename field, if it does not exist.

  • Contents of the File: If you selected the Create File, If Does Not Exist check box, specify the contents of the newly created file that is created if the specified file does not exist.

  • Apply Changes Configured in the Change List: Specify whether you want to apply the changes that you added to the Change List box to the newly created file.

Run Action As

On Windows, specify System (the default) or User from the Run Action As list. Specify System if removing files requires access to all areas of the device’s file system. If you use mapped network drives to specify files and directories, you must run the action as User.

On Linux, specify root (the default) or User from the list. Specify root only if the managed devices are run by the root user.

6.8.2 Requirements

The Requirements page lets you define specific requirements that a device must meet for the action to be enforced on it. For information about the requirements, see Requirements.