Read/Write Binary File - Symantec WISESCRIPT PACKAGE EDITOR 8.0 - REFERENCE FOR WISE PACKAGE STUDIO V1.0 Reference

Table of Contents

Advertisement

Read/Write Binary File

WiseScript Package Editor Reference
Variable
Specify the variable in which to store each line of the text file (example: TEXTLINE).
Action
Select an action:
Read lines of file into variable
Reads a line into the variable, but does not write it back to the original file.
Update file with new contents of variable
Reads a line into the variable, and at the end of the loop, writes the contents of
the variable back to the line in the text file.
Make Backup File
Mark this to make a copy of the text file before editing it. A number is appended to
the end of the file name for the backup copies (example: text.001, text.002, and so
on).
The sample script TextFile.wse uses this action. For details on sample scripts, see
ScriptHelp.htm in the Samples subdirectory of this product's installation directory.
See also:
End Statement
on page 155
This action reads from a binary file to a variable, or writes from a variable to a binary
file. If you write to the file, the existing information in the file is not moved, it is
overwritten.
This action does not support reading or writing non-ASCII characters (characters with
codes above 127).
Note
When a WiseScript is called by a Windows Installer installation, the Windows Installer
installation does not recognize changes that the WiseScript makes to the destination
computer and will not uninstall them. Therefore, you must provide a way to uninstall or
repair such changes. See Uninstalling Changes Made by a WiseScript in the Windows
Installer Editor Help.
To complete the dialog box
File Pathname
Specify the path of the file to be read (example: %MAINDIR%\File.exe).
Variable Name
Select or enter the variable that is to be read into or written from.
File Offset
Enter the number of bytes into the file to start writing or reading. Bytes are
numbered starting with zero.
Max. Length
Enter the maximum number of bytes to be written to or read from the file. When
writing, if the length of the variable exceeds this value, the string is truncated.
When reading, any trailing spaces are trimmed.
WiseScript Actions
187

Hide quick links:

Advertisement

Table of Contents
loading

This manual is also suitable for:

Wisescript package editor 8.0

Table of Contents