InstallShield 2018 » InstallScript Language Reference
Project • This information applies to InstallScript projects.
LogWriteCustomString writes the string specified by szValue to the log file in the custom logging section under the key name specified by szKey.
Syntax
LogWriteCustomString( szKey, szValue );
Parameters
Parameter |
Description |
szKey |
Specifies the key name that identifies the string being written to the log file. All key names written to a particular log file must be unique, regardless of whether they are written with LogWriteCustomString or LogWriteCustomNumber. If you specify a key name that already exists in the custom logging section, its value is overwritten. |
szValue |
Specifies the value to be written to the log file. |
Return Values
Return Value |
Description |
>= ISERR_SUCCESS |
Indicates that the function successfully wrote the string to the log file. |
< ISERR_SUCCESS |
Indicates that the function was unable to write the string to the log file. |
Additional Information
LogWriteCustomString fails if you call it while logging is disabled.
Custom log file entries do not affect maintenance or uninstallation of the product unless you add code to the script to read custom values and perform actions based on those values. LogWriteCustomString cannot write data to the maintenance/uninstallation section of the log file (that is, the section where the installation automatically writes data, such as the files that are installed and the registry entries that are created, and from which it automatically reads data during maintenance or uninstallation).
Note • If you selected the Show Password dialog box during setup initialization check box in the Password & Copyright panel of the Release Wizard or selected Yes for the Show Password Dialog setting in the Releases view, the default code for the OnCheckMediaPassword event handler function calls LogWriteCustomString with szKey set to MEDIA_PASSWORD_KEY in order to store a password-protected installation’s password (as entered by the end user) so that maintenance and upgrade operations do not require that the same password be reentered. That default code also calls LogWriteCustomString with szKey set to MEDIA_PASSWORD_KEY in order to check whether the password is already stored before querying the end user for the password.
To execute script code only when the product is being completely uninstalled, use an if-then statement:
if REMOVEALLMODE!=0 then
/* this code is executed only during uninstallation */
endif;
To perform specific uninstallation actions when a particular feature is uninstalled, override the feature’s UnInstalling event with the appropriate code.
See Also
InstallScript Functions that Are Logged for Uninstallation
InstallShield 2018 Help LibrarySeptember 2018 |
Copyright Information | Flexera |