# Struct ipworkspgp::SDA

The SDA struct can be used to create a self-decrypting archive which will run natively on Windows platforms.

## Syntax

```text
ipworkspgp::SDA
```

## Remarks

The struct uses the Deflate algorithm specified in RFC 1951 for compression, and then creates a self-decrypting executable archive. This exe will bring up a dialog that will allow the user to select the target directory in which to decompress the files. There is also an optional splash screen that may be displayed before decompression. The text for this splash screen may be set with the [banner_text](#banner_text-property-sda-struct) property. You can also set the text that appears on the title bar of each dialog box using the [caption_text](#caption_text-property-sda-struct) property.

**Example (Creating a Self-Decrypting Archive)**

```text
struct.ArchiveFile = "c:\test.exe"
struct.RecurseSubdirectories = true
struct.SourceDirectory = "c:\foo\"
struct.CaptionText = "Testing SDA"
struct.BannerText = "Press continue to decompress the archive."
struct.CreateSDA()

struct.ArchiveFile = "c:\test.exe"
struct.SourceFile = "c:\foo\bar.dat"
struct.CaptionText = "Testing SDA"
struct.BannerText = "Press continue to decompress the archive."
struct.CreateSDA()
```

Note: When creating a self-decrypting archive which exceeds 4 GB or more of uncompressed data or which contains more than 64K files, the struct will create a 64-bit archive.

The self-decrypting archive that is created by the SDA struct is a Windows application. However, there are command line options available if you wish to batch multiple files. The options are:

| Option Name | Description |
| --- | --- |
| targetpath | Path to decompress the archive to. This overrides the [extract_to_path](#extract_to_path-property-sda-struct). "." indicates the current directory (if no [extract_to_path](#extract_to_path-property-sda-struct) was specified and no targetpath is given, the archive is decompressed to the current directory). |
| overwrite | If set to true, the archive will automatically overwrite existing files (thus suppressing the message box asking you to overwrite or not) |
| displaymessage | If set to false, it will suppress the display of the "Extraction Complete" message after the archive has finished (this may also be accomplished by setting the [CompleteMessage](#CompleteMessage) config setting to ""). |
| openfile | If set to false, this option will override opening the file indicated by [file_to_execute](#file_to_execute-property-sda-struct). (Alternatively, set [file_to_execute](#file_to_execute-property-sda-struct) to ""). |
| password | The password used to decrypt the archive. If the archive is not encrypted this option is ignored. However if the archive is encrypted and no password is supplied, decompression will fail. |

For example, the following suppresses all questions and message boxes, and decompress to the current directory, use the following options:

```text
  SDAExtractor /targetpath="." /overwrite=1 /displaymessage=0 /openfile=0 /password=pass
```

Note that if you run the self-decrypting archive with any command line options, the pop up message box containing the [banner_text](#banner_text-property-sda-struct) will be suppressed.

### Object Lifetime

 The *new()* method returns a mutable reference to a struct instance. The object itself is kept in the global list maintained by IPWorksPGP. Due to this, the SDA struct cannot be disposed of automatically. Please, call the *dispose(&mut; self)* method of SDA when you have finished using the instance.

## Property List

*The following is the full list of the properties of the struct with short descriptions. Click on the links for further details.*

|  |  |
| --- | --- |
| [archive_file](#archive_file-property-sda-struct) | The name of the self-decrypting archive to create. |
| [banner_text](#banner_text-property-sda-struct) | Optional banner text to show before the self-extraction starts. |
| [caption_text](#caption_text-property-sda-struct) | Optional caption (title) text for the self-extractor dialogs. |
| [compression_level](#compression_level-property-sda-struct) | The compression level to use. |
| [extract_to_path](#extract_to_path-property-sda-struct) | Optional target directory for the self-extractor. |
| [file_to_execute](#file_to_execute-property-sda-struct) | Optional file to execute (open) after the archive is extracted. |
| [password](#password-property-sda-struct) | An optional password for the self-decrypting archive. |
| [recurse_subdirectories](#recurse_subdirectories-property-sda-struct) | Whether or not to recurse into subdirectories during archive creation. |
| [source_directory](#source_directory-property-sda-struct) | Directory to be compressed into a self-decrypting archive. |
| [source_file](#source_file-property-sda-struct) | File to be compressed into a self-decrypting archive. |

## Method List

*The following is the full list of the methods of the struct with short descriptions. Click on the links for further details.*

|  |  |
| --- | --- |
| [config](#config-method-sda-struct) | Sets or retrieves a configuration setting. |
| [create_sda](#create_sda-method-sda-struct) | Compresses the files and creates a self-decrypting archive. |
| [reset](#reset-method-sda-struct) | Resets the struct. |

## Event List

*The following is the full list of the events fired by the struct with short descriptions. Click on the links for further details.*

|  |  |
| --- | --- |
| [on_error](#on_error-event-sda-struct) | Information about non-fatal errors. |
| [on_progress](#on_progress-event-sda-struct) | Fired as progress is made. |
| [on_status](#on_status-event-sda-struct) | Shows the progress of the operation. |

## Config Settings

*The following is a list of config settings for the struct with short descriptions. Click on the links for further details.*

|  |  |
| --- | --- |
| [CompleteMessage](#CompleteMessage) | Message to notify user that extraction has finished normally. |
| [ExtractorStub](#ExtractorStub) | Path to optional self-extractor executable stub. |
| [FileToExecuteParams](#FileToExecuteParams) | List of parameters to pass to FileToExecute. |
| [InstallationMode](#InstallationMode) | This setting will install to ExtractToPath, run FileToExecute, and then remove the extracted files. |
| [LogLevel](#LogLevel) | Specifies the level of detail that is logged. |
| [RequireAdminPrivs](#RequireAdminPrivs) | Specifies whether the created executable requires Administrator privileges. |
| [SilentExtraction](#SilentExtraction) | Specifies whether the archive should hide all UI interaction while extracting. |
| [BuildInfo](#BuildInfo) | Information about the product's build. |
| [CodePage](#CodePage) | The system code page used for Unicode to Multibyte translations. |
| [LicenseInfo](#LicenseInfo) | Information about the current license. |
| [MaskSensitiveData](#MaskSensitiveData) | Whether sensitive data is masked in log messages. |
| [UseInternalSecurityAPI](#UseInternalSecurityAPI) | Whether or not to use the system security libraries or an internal implementation. |

# archive_file property ([SDA](#struct-ipworkspgpsda) Struct)

The name of the self-decrypting archive to create.

## Syntax

*Rust Syntax*

```text
fn archive_file(&self ) -> Result<String, IPWorksPGPError> fn set_archive_file(&self, value : &str) ->  Option<IPWorksPGPError>
fn set_archive_file_ref(&self, value : &String) ->  Option<IPWorksPGPError>
```

## Default Value

""

## Remarks

This property specifies the name of the archive to be written when CreateSDA is called. Any pre-existing archive file will be overwritten.

The filename may be specified with or without a path. Paths may be relative or absolute, and should be specified in the format native to the host operating system. The filename should be specified with the appropriate ".exe" extension. An extension will not automatically be appended by the struct.

If the file cannot be written a trappable error will be generated.

**Example (Creating a Self-Decrypting Archive)**

```text
struct.ArchiveFile = "c:\test.exe"
struct.RecurseSubdirectories = true
struct.SourceDirectory = "c:\foo\"
struct.CaptionText = "Testing SDA"
struct.BannerText = "Press continue to decompress the archive."
struct.CreateSDA()

struct.ArchiveFile = "c:\test.exe"
struct.SourceFile = "c:\foo\bar.dat"
struct.CaptionText = "Testing SDA"
struct.BannerText = "Press continue to decompress the archive."
struct.CreateSDA()
```

Note: When creating a self-decrypting archive which exceeds 4 GB or more of uncompressed data or which contains more than 64K files, the struct will create a 64-bit archive.

## Data Type

String

# banner_text property ([SDA](#struct-ipworkspgpsda) Struct)

Optional banner text to show before the self-extraction starts.

## Syntax

*Rust Syntax*

```text
fn banner_text(&self ) -> Result<String, IPWorksPGPError> fn set_banner_text(&self, value : &str) ->  Option<IPWorksPGPError>
fn set_banner_text_ref(&self, value : &String) ->  Option<IPWorksPGPError>
```

## Default Value

""

## Remarks

If this property is set, a dialog box will pop up displaying the contents of this property as soon as the SDA executable is run. If this property is set to an empty string (default) no banner dialog will be displayed.

**Example (Creating a Self-Decrypting Archive)**

```text
struct.ArchiveFile = "c:\test.exe"
struct.RecurseSubdirectories = true
struct.SourceDirectory = "c:\foo\"
struct.CaptionText = "Testing SDA"
struct.BannerText = "Press continue to decompress the archive."
struct.CreateSDA()

struct.ArchiveFile = "c:\test.exe"
struct.SourceFile = "c:\foo\bar.dat"
struct.CaptionText = "Testing SDA"
struct.BannerText = "Press continue to decompress the archive."
struct.CreateSDA()
```

## Data Type

String

# caption_text property ([SDA](#struct-ipworkspgpsda) Struct)

Optional caption (title) text for the self-extractor dialogs.

## Syntax

*Rust Syntax*

```text
fn caption_text(&self ) -> Result<String, IPWorksPGPError> fn set_caption_text(&self, value : &str) ->  Option<IPWorksPGPError>
fn set_caption_text_ref(&self, value : &String) ->  Option<IPWorksPGPError>
```

## Default Value

""

## Remarks

This property contains the text which will appear on the title bar of the dialog boxes that appear when running the SDA executable file. If this property is not set, "IPWorks PG Self Extractor - www.nsoftware.com" will appear in the title bar.

**Example (Creating a Self-Decrypting Archive)**

```text
struct.ArchiveFile = "c:\test.exe"
struct.RecurseSubdirectories = true
struct.SourceDirectory = "c:\foo\"
struct.CaptionText = "Testing SDA"
struct.BannerText = "Press continue to decompress the archive."
struct.CreateSDA()

struct.ArchiveFile = "c:\test.exe"
struct.SourceFile = "c:\foo\bar.dat"
struct.CaptionText = "Testing SDA"
struct.BannerText = "Press continue to decompress the archive."
struct.CreateSDA()
```

## Data Type

String

# compression_level property ([SDA](#struct-ipworkspgpsda) Struct)

The compression level to use.

## Syntax

*Rust Syntax*

```text
fn compression_level(&self ) -> Result<i32, IPWorksPGPError> fn set_compression_level(&self, value : i32) ->  Option<IPWorksPGPError>
```

## Default Value

4

## Remarks

This property specifies the level of compression to be used, between 0 and 6. Higher values will cause the struct to compress better; lower values will cause the struct to compress faster. A value of 0 will store the file without compression.

## Data Type

i32

# extract_to_path property ([SDA](#struct-ipworkspgpsda) Struct)

Optional target directory for the self-extractor.

## Syntax

*Rust Syntax*

```text
fn extract_to_path(&self ) -> Result<String, IPWorksPGPError> fn set_extract_to_path(&self, value : &str) ->  Option<IPWorksPGPError>
fn set_extract_to_path_ref(&self, value : &String) ->  Option<IPWorksPGPError>
```

## Default Value

""

## Remarks

If set to empty string (default), the self-extractor will attempt to extract files into a subdirectory of the directory it is being executed from.

The name of the subdirectory is derived from the name of the self-decrypting archive by removing its extension.

## Data Type

String

# file_to_execute property ([SDA](#struct-ipworkspgpsda) Struct)

Optional file to execute (open) after the archive is extracted.

## Syntax

*Rust Syntax*

```text
fn file_to_execute(&self ) -> Result<String, IPWorksPGPError> fn set_file_to_execute(&self, value : &str) ->  Option<IPWorksPGPError>
fn set_file_to_execute_ref(&self, value : &String) ->  Option<IPWorksPGPError>
```

## Default Value

"."

## Remarks

This property specifies an executable file which will be run after the archive has completed decompressing. This must be a relative path to a file located within [extract_to_path](#extract_to_path-property-sda-struct). If this property is set to ".", the folder to which the archive has been decompressed will open in Windows Explorer. If this property is set to "" (empty string), the extractor will close and take no action.

## Data Type

String

# password property ([SDA](#struct-ipworkspgpsda) Struct)

An optional password for the self-decrypting archive.

## Syntax

*Rust Syntax*

```text
fn password(&self ) -> Result<String, IPWorksPGPError> fn set_password(&self, value : &str) ->  Option<IPWorksPGPError>
fn set_password_ref(&self, value : &String) ->  Option<IPWorksPGPError>
```

## Default Value

""

## Remarks

This property specifies a case-sensitive password used to encrypt or decrypt the archive. If set to an empty string (default), no encryption is used.

The maximum supported length of the password is 128 characters.

**Example (compressing an SDA archive):**

```text
struct.ArchiveFile = "c:\test.exe"
struct.RecurseSubdirectories = true
struct.SourceDirectory = "c:\foo"
struct.Password = "nsoftware"
struct.CreateSDA()
```

## Data Type

String

# recurse_subdirectories property ([SDA](#struct-ipworkspgpsda) Struct)

Whether or not to recurse into subdirectories during archive creation.

## Syntax

*Rust Syntax*

```text
fn recurse_subdirectories(&self ) -> Result<bool, IPWorksPGPError> fn set_recurse_subdirectories(&self, value : bool) ->  Option<IPWorksPGPError>
```

## Default Value

true

## Remarks

If this property is set to true, when calling CreateSDA the struct will recurse into all the subdirectories under [source_directory](#source_directory-property-sda-struct) and include them in the self extracting archive. If this property is false, only the files in [source_directory](#source_directory-property-sda-struct) will be included in the archive.

## Data Type

bool

# source_directory property ([SDA](#struct-ipworkspgpsda) Struct)

Directory to be compressed into a self-decrypting archive.

## Syntax

*Rust Syntax*

```text
fn source_directory(&self ) -> Result<String, IPWorksPGPError> fn set_source_directory(&self, value : &str) ->  Option<IPWorksPGPError>
fn set_source_directory_ref(&self, value : &String) ->  Option<IPWorksPGPError>
```

## Default Value

""

## Remarks

This property specifies the name of the directory containing the files to be compressed. This may be a local or absolute path. If the [recurse_subdirectories](#recurse_subdirectories-property-sda-struct) property is true, all the subdirectories under source_directory will be recursed into, and those files will also be compressed.

**Example (Creating a Self-Decrypting Archive)**

```text
struct.ArchiveFile = "c:\test.exe"
struct.RecurseSubdirectories = true
struct.SourceDirectory = "c:\foo\"
struct.CaptionText = "Testing SDA"
struct.BannerText = "Press continue to decompress the archive."
struct.CreateSDA()

struct.ArchiveFile = "c:\test.exe"
struct.SourceFile = "c:\foo\bar.dat"
struct.CaptionText = "Testing SDA"
struct.BannerText = "Press continue to decompress the archive."
struct.CreateSDA()
```

## Data Type

String

# source_file property ([SDA](#struct-ipworkspgpsda) Struct)

File to be compressed into a self-decrypting archive.

## Syntax

*Rust Syntax*

```text
fn source_file(&self ) -> Result<String, IPWorksPGPError> fn set_source_file(&self, value : &str) ->  Option<IPWorksPGPError>
fn set_source_file_ref(&self, value : &String) ->  Option<IPWorksPGPError>
```

## Default Value

""

## Remarks

This property specifies the name of a single file to be compressed. When both source_file and [source_directory](#source_directory-property-sda-struct) are set, only [source_directory](#source_directory-property-sda-struct) is used.

**Example (Creating a Self-Decrypting Archive)**

```text
struct.ArchiveFile = "c:\test.exe"
struct.RecurseSubdirectories = true
struct.SourceDirectory = "c:\foo\"
struct.CaptionText = "Testing SDA"
struct.BannerText = "Press continue to decompress the archive."
struct.CreateSDA()

struct.ArchiveFile = "c:\test.exe"
struct.SourceFile = "c:\foo\bar.dat"
struct.CaptionText = "Testing SDA"
struct.BannerText = "Press continue to decompress the archive."
struct.CreateSDA()
```

## Data Type

String

# config method ([SDA](#struct-ipworkspgpsda) Struct)

Sets or retrieves a configuration setting.

## Syntax

*Rust Syntax*

```text
fn config(&self, configuration_string : &str) ->  Result<String, IPWorksPGPError>
```

## Remarks

config is a generic method available in every struct. It is used to set and retrieve [configuration settings](#config-settings-sda-struct) for the struct.

These settings are similar in functionality to properties, but they are rarely used. In order to avoid "polluting" the property namespace of the struct, access to these *internal properties* is provided through the config method.

To set a configuration setting named *PROPERTY*, you must call *Config("PROPERTY=VALUE")*, where *VALUE* is the value of the setting expressed as a string. For boolean values, use the strings "True", "False", "0", "1", "Yes", or "No" (case does not matter).

To read (query) the value of a [configuration setting](#config-settings-sda-struct), you must call *Config("PROPERTY")*. The value will be returned as a string.

# create_sda method ([SDA](#struct-ipworkspgpsda) Struct)

Compresses the files and creates a self-decrypting archive.

## Syntax

*Rust Syntax*

```text
fn create_sda(&self) -> Result<(), IPWorksPGPError>
```

## Remarks

Invoking **CreateSDA** creates the archive specified by [archive_file](#archive_file-property-sda-struct). When the method is called, all files specified by [source_directory](#source_directory-property-sda-struct) will be compressed and written to [archive_file](#archive_file-property-sda-struct). If [recurse_subdirectories](#recurse_subdirectories-property-sda-struct) is true, all the subdirectories under [source_directory](#source_directory-property-sda-struct) and the files they contain will also be compressed and written to [archive_file](#archive_file-property-sda-struct).

If [archive_file](#archive_file-property-sda-struct) exists when you call CreateSDA it will be overwritten.

As the files in [source_directory](#source_directory-property-sda-struct) are being compressed, the [on_progress](#on_progress-event-sda-struct) event will fire periodically to indicate how many bytes have been processed and the percentage of compression that has been completed.

To include your own custom text on the title bar of all of the self-extractor dialog boxes, set the [caption_text](#caption_text-property-sda-struct) before calling CreateSDA. Setting the optional [banner_text](#banner_text-property-sda-struct) property will cause a small dialog to pop up when the self-extractor is run. You can put in a description of the contents, instructions, or any text you like.

**Example (Creating a Self-Decrypting Archive)**

```text
struct.ArchiveFile = "c:\test.exe"
struct.RecurseSubdirectories = true
struct.SourceDirectory = "c:\foo\"
struct.CaptionText = "Testing SDA"
struct.BannerText = "Press continue to decompress the archive."
struct.CreateSDA()

struct.ArchiveFile = "c:\test.exe"
struct.SourceFile = "c:\foo\bar.dat"
struct.CaptionText = "Testing SDA"
struct.BannerText = "Press continue to decompress the archive."
struct.CreateSDA()
```

Note: When creating a self-decrypting archive which exceeds 4 GB or more of uncompressed data or which contains more than 64K files, the struct will create a 64-bit archive.

The self-decrypting archive that is created by the SDA struct is a Windows application. However, there are command line options available if you wish to batch multiple files. The options are:

| Option Name | Description |
| --- | --- |
| targetpath | Path to decompress the archive to. This overrides the [extract_to_path](#extract_to_path-property-sda-struct). "." indicates the current directory (if no [extract_to_path](#extract_to_path-property-sda-struct) was specified and no targetpath is given, the archive is decompressed to the current directory). |
| overwrite | If set to true, the archive will automatically overwrite existing files (thus suppressing the message box asking you to overwrite or not) |
| displaymessage | If set to false, it will suppress the display of the "Extraction Complete" message after the archive has finished (this may also be accomplished by setting the [CompleteMessage](#CompleteMessage) config setting to ""). |
| openfile | If set to false, this option will override opening the file indicated by [file_to_execute](#file_to_execute-property-sda-struct). (Alternatively, set [file_to_execute](#file_to_execute-property-sda-struct) to ""). |
| password | The password used to decrypt the archive. If the archive is not encrypted this option is ignored. However if the archive is encrypted and no password is supplied, decompression will fail. |

For example, the following suppresses all questions and message boxes, and decompress to the current directory, use the following options:

```text
  SDAExtractor /targetpath="." /overwrite=1 /displaymessage=0 /openfile=0 /password=pass
```

Note that if you run the self-decrypting archive with any command line options, the pop up message box containing the [banner_text](#banner_text-property-sda-struct) will be suppressed.

# reset method ([SDA](#struct-ipworkspgpsda) Struct)

Resets the struct.

## Syntax

*Rust Syntax*

```text
fn reset(&self) -> Result<(), IPWorksPGPError>
```

## Remarks

reset resets the state of the struct. All properties will be set to their default values, and any files open will be closed.

# on_error event ([SDA](#struct-ipworkspgpsda) Struct)

Information about non-fatal errors.

## Syntax

*Rust Syntax*

```text
// SDAErrorEventArgs carries the SDA Error event's parameters.
pub struct SDAErrorEventArgs {
  fn description(&self) -> &String
  fn error_code(&self) -> i32
  fn index(&self) -> i32
  fn file_name(&self) -> &String
  fn ignore(&self) -> bool
  fn set_ignore(&self, value : bool)
}

// SDAErrorEvent defines the signature of the SDA Error event's handler function.
pub trait SDAErrorEvent {
  fn on_error(&self, sender : SDA, e : &mut SDAErrorEventArgs);
}

impl <'a> SDA<'a> {
  pub fn on_error(&self) -> &'a dyn SDAErrorEvent;
  pub fn set_on_error(&mut self, value : &'a dyn SDAErrorEvent);
  ...
}
```

## Remarks

The on_error event is fired when non-fatal errors occur during compression or decompression. Note that if this event is fired during decompression this may indicate that the archive is corrupt.

By default these errors will cause the component to fail with an exception. The exception may be overridden by setting *ignore* to true. This will cause the error to be ignored, the file will be skipped if necessary, and the struct will continue operation.

*error_code* will correspond to one of the following errors:

|  |  |
| --- | --- |
| 1 | Bad or missing CRC-32 checksum. |
| 2 | Failed to set creation date of a file. |
| 111 | Can't open file for read (skipping). |

*description* contains a textual description of the error. *index* and *file_name* contain the array index (where appropriate) and filename of the file being processed at the time of the error.

# on_progress event ([SDA](#struct-ipworkspgpsda) Struct)

Fired as progress is made.

## Syntax

*Rust Syntax*

```text
// SDAProgressEventArgs carries the SDA Progress event's parameters.
pub struct SDAProgressEventArgs {
  fn file_name(&self) -> &String
  fn bytes_processed(&self) -> i64
  fn percent_processed(&self) -> i32
}

// SDAProgressEvent defines the signature of the SDA Progress event's handler function.
pub trait SDAProgressEvent {
  fn on_progress(&self, sender : SDA, e : &mut SDAProgressEventArgs);
}

impl <'a> SDA<'a> {
  pub fn on_progress(&self) -> &'a dyn SDAProgressEvent;
  pub fn set_on_progress(&mut self, value : &'a dyn SDAProgressEvent);
  ...
}
```

## Remarks

The on_progress event is automatically fired as compression is performed.

*file_name* contains the name of the file being written.

*bytes_processed* contains the total number of uncompressed bytes processed.

*percent_processed* contains the percent of uncompressed bytes processed, corresponding roughly to the running time of the operation.

# on_status event ([SDA](#struct-ipworkspgpsda) Struct)

Shows the progress of the operation.

## Syntax

*Rust Syntax*

```text
// SDAStatusEventArgs carries the SDA Status event's parameters.
pub struct SDAStatusEventArgs {
  fn message(&self) -> &String
}

// SDAStatusEvent defines the signature of the SDA Status event's handler function.
pub trait SDAStatusEvent {
  fn on_status(&self, sender : SDA, e : &mut SDAStatusEventArgs);
}

impl <'a> SDA<'a> {
  pub fn on_status(&self) -> &'a dyn SDAStatusEvent;
  pub fn set_on_status(&mut self, value : &'a dyn SDAStatusEvent);
  ...
}
```

## Remarks

The event is fired for informational and logging purposes only. It may be used to track the progress of an operation.

The level of detail is controlled by the [LogLevel](#LogLevel) setting.

# Config Settings ([SDA](#struct-ipworkspgpsda) Struct)

 The struct accepts one or more of the following *configuration settings*. Configuration settings are similar in functionality to properties, but they are rarely used. In order to avoid "polluting" the property namespace of the struct, access to these *internal properties* is provided through the [config](#config-method-sda-struct) method.

### SDA Config Settings

**CompleteMessage**: Message to notify user that extraction has finished normally. When the self-decrypting executable created by this struct successfully finishes extracting the files contained within itself, it may optionally display a Message Box indicating that it's finished. By default, the message "Extraction Complete." is displayed. You may change this to your own custom message. However, any message longer than 400 characters will be truncated. To disable this message, set the CompleteMessage configuration setting to "" (empty string).

**ExtractorStub**: Path to optional self-extractor executable stub. Normally the struct loads a self-extractor stub from an internal resource and uses it to create the self-decrypting executable.

If a path is specified in this setting, the file indicated by that path is used instead.

This setting allows you to specify a custom self-extractor. The compiled self-extractor stub is available on demand. Resources such as icons and text may then be modified.

This may also be used to specify if the resulting executable should be 32 bit or 64 bit by setting this to either "*32bit" or "*64bit".

**FileToExecuteParams**: List of parameters to pass to FileToExecute.This setting allows you to pass command-line parameters to the executable file indicated by [file_to_execute](#file_to_execute-property-sda-struct). Parameters should be in the form of a space-separated list.

**InstallationMode**: This setting will install to ExtractToPath, run FileToExecute, and then remove the extracted files. Is set to true, this setting makes the self-extractor behave as an installer by installing to a temp directory, running the desired executable, and removing the extracted files upon completion. The default value is false.

**LogLevel**: Specifies the level of detail that is logged.This setting controls the level of detail that is logged through the [on_status](#on_status-event-sda-struct) event. Possible values are:

|  |  |
| --- | --- |
| 0 (none) | No events are logged. |
| 1 (info - default) | Informational events are logged. |
| 2 (verbose) | Detailed data is logged. |
| 3 (debug) | Debug data is logged. |

**RequireAdminPrivs**: Specifies whether the created executable requires Administrator privileges.This setting specifies whether the executable created by the struct requires Administrator privileges to execute.

This setting is false by default.

**SilentExtraction**: Specifies whether the archive should hide all UI interaction while extracting.This setting specifies whether to hide the progress bar and success window when the archive executable is run. Setting this config to true is equivalent to passing the '/s' command-line parameter to the archive executable.

This setting is false by default.

### Base Config Settings

**BuildInfo**: Information about the product's build.When queried, this setting will return a string containing information about the product's build.

**CodePage**: The system code page used for Unicode to Multibyte translations.The default code page is Unicode UTF-8 (65001).

The following is a list of valid code page identifiers:

|  |  |
| --- | --- |
| Identifier | Name |
| 037 | IBM EBCDIC - U.S./Canada |
| 437 | OEM - United States |
| 500 | IBM EBCDIC - International |
| 708 | Arabic - ASMO 708 |
| 709 | Arabic - ASMO 449+, BCON V4 |
| 710 | Arabic - Transparent Arabic |
| 720 | Arabic - Transparent ASMO |
| 737 | OEM - Greek (formerly 437G) |
| 775 | OEM - Baltic |
| 850 | OEM - Multilingual Latin I |
| 852 | OEM - Latin II |
| 855 | OEM - Cyrillic (primarily Russian) |
| 857 | OEM - Turkish |
| 858 | OEM - Multilingual Latin I + Euro symbol |
| 860 | OEM - Portuguese |
| 861 | OEM - Icelandic |
| 862 | OEM - Hebrew |
| 863 | OEM - Canadian-French |
| 864 | OEM - Arabic |
| 865 | OEM - Nordic |
| 866 | OEM - Russian |
| 869 | OEM - Modern Greek |
| 870 | IBM EBCDIC - Multilingual/ROECE (Latin-2) |
| 874 | ANSI/OEM - Thai (same as 28605, ISO 8859-15) |
| 875 | IBM EBCDIC - Modern Greek |
| 932 | ANSI/OEM - Japanese, Shift-JIS |
| 936 | ANSI/OEM - Simplified Chinese (PRC, Singapore) |
| 949 | ANSI/OEM - Korean (Unified Hangul Code) |
| 950 | ANSI/OEM - Traditional Chinese (Taiwan; Hong Kong SAR, PRC) |
| 1026 | IBM EBCDIC - Turkish (Latin-5) |
| 1047 | IBM EBCDIC - Latin 1/Open System |
| 1140 | IBM EBCDIC - U.S./Canada (037 + Euro symbol) |
| 1141 | IBM EBCDIC - Germany (20273 + Euro symbol) |
| 1142 | IBM EBCDIC - Denmark/Norway (20277 + Euro symbol) |
| 1143 | IBM EBCDIC - Finland/Sweden (20278 + Euro symbol) |
| 1144 | IBM EBCDIC - Italy (20280 + Euro symbol) |
| 1145 | IBM EBCDIC - Latin America/Spain (20284 + Euro symbol) |
| 1146 | IBM EBCDIC - United Kingdom (20285 + Euro symbol) |
| 1147 | IBM EBCDIC - France (20297 + Euro symbol) |
| 1148 | IBM EBCDIC - International (500 + Euro symbol) |
| 1149 | IBM EBCDIC - Icelandic (20871 + Euro symbol) |
| 1200 | Unicode UCS-2 Little-Endian (BMP of ISO 10646) |
| 1201 | Unicode UCS-2 Big-Endian |
| 1250 | ANSI - Central European |
| 1251 | ANSI - Cyrillic |
| 1252 | ANSI - Latin I |
| 1253 | ANSI - Greek |
| 1254 | ANSI - Turkish |
| 1255 | ANSI - Hebrew |
| 1256 | ANSI - Arabic |
| 1257 | ANSI - Baltic |
| 1258 | ANSI/OEM - Vietnamese |
| 1361 | Korean (Johab) |
| 10000 | MAC - Roman |
| 10001 | MAC - Japanese |
| 10002 | MAC - Traditional Chinese (Big5) |
| 10003 | MAC - Korean |
| 10004 | MAC - Arabic |
| 10005 | MAC - Hebrew |
| 10006 | MAC - Greek I |
| 10007 | MAC - Cyrillic |
| 10008 | MAC - Simplified Chinese (GB 2312) |
| 10010 | MAC - Romania |
| 10017 | MAC - Ukraine |
| 10021 | MAC - Thai |
| 10029 | MAC - Latin II |
| 10079 | MAC - Icelandic |
| 10081 | MAC - Turkish |
| 10082 | MAC - Croatia |
| 12000 | Unicode UCS-4 Little-Endian |
| 12001 | Unicode UCS-4 Big-Endian |
| 20000 | CNS - Taiwan |
| 20001 | TCA - Taiwan |
| 20002 | Eten - Taiwan |
| 20003 | IBM5550 - Taiwan |
| 20004 | TeleText - Taiwan |
| 20005 | Wang - Taiwan |
| 20105 | IA5 IRV International Alphabet No. 5 (7-bit) |
| 20106 | IA5 German (7-bit) |
| 20107 | IA5 Swedish (7-bit) |
| 20108 | IA5 Norwegian (7-bit) |
| 20127 | US-ASCII (7-bit) |
| 20261 | T.61 |
| 20269 | ISO 6937 Non-Spacing Accent |
| 20273 | IBM EBCDIC - Germany |
| 20277 | IBM EBCDIC - Denmark/Norway |
| 20278 | IBM EBCDIC - Finland/Sweden |
| 20280 | IBM EBCDIC - Italy |
| 20284 | IBM EBCDIC - Latin America/Spain |
| 20285 | IBM EBCDIC - United Kingdom |
| 20290 | IBM EBCDIC - Japanese Katakana Extended |
| 20297 | IBM EBCDIC - France |
| 20420 | IBM EBCDIC - Arabic |
| 20423 | IBM EBCDIC - Greek |
| 20424 | IBM EBCDIC - Hebrew |
| 20833 | IBM EBCDIC - Korean Extended |
| 20838 | IBM EBCDIC - Thai |
| 20866 | Russian - KOI8-R |
| 20871 | IBM EBCDIC - Icelandic |
| 20880 | IBM EBCDIC - Cyrillic (Russian) |
| 20905 | IBM EBCDIC - Turkish |
| 20924 | IBM EBCDIC - Latin-1/Open System (1047 + Euro symbol) |
| 20932 | JIS X 0208-1990 & 0121-1990 |
| 20936 | Simplified Chinese (GB2312) |
| 21025 | IBM EBCDIC - Cyrillic (Serbian, Bulgarian) |
| 21027 | Extended Alpha Lowercase |
| 21866 | Ukrainian (KOI8-U) |
| 28591 | ISO 8859-1 Latin I |
| 28592 | ISO 8859-2 Central Europe |
| 28593 | ISO 8859-3 Latin 3 |
| 28594 | ISO 8859-4 Baltic |
| 28595 | ISO 8859-5 Cyrillic |
| 28596 | ISO 8859-6 Arabic |
| 28597 | ISO 8859-7 Greek |
| 28598 | ISO 8859-8 Hebrew |
| 28599 | ISO 8859-9 Latin 5 |
| 28605 | ISO 8859-15 Latin 9 |
| 29001 | Europa 3 |
| 38598 | ISO 8859-8 Hebrew |
| 50220 | ISO 2022 Japanese with no halfwidth Katakana |
| 50221 | ISO 2022 Japanese with halfwidth Katakana |
| 50222 | ISO 2022 Japanese JIS X 0201-1989 |
| 50225 | ISO 2022 Korean |
| 50227 | ISO 2022 Simplified Chinese |
| 50229 | ISO 2022 Traditional Chinese |
| 50930 | Japanese (Katakana) Extended |
| 50931 | US/Canada and Japanese |
| 50933 | Korean Extended and Korean |
| 50935 | Simplified Chinese Extended and Simplified Chinese |
| 50936 | Simplified Chinese |
| 50937 | US/Canada and Traditional Chinese |
| 50939 | Japanese (Latin) Extended and Japanese |
| 51932 | EUC - Japanese |
| 51936 | EUC - Simplified Chinese |
| 51949 | EUC - Korean |
| 51950 | EUC - Traditional Chinese |
| 52936 | HZ-GB2312 Simplified Chinese |
| 54936 | Windows XP: GB18030 Simplified Chinese (4 Byte) |
| 57002 | ISCII Devanagari |
| 57003 | ISCII Bengali |
| 57004 | ISCII Tamil |
| 57005 | ISCII Telugu |
| 57006 | ISCII Assamese |
| 57007 | ISCII Oriya |
| 57008 | ISCII Kannada |
| 57009 | ISCII Malayalam |
| 57010 | ISCII Gujarati |
| 57011 | ISCII Punjabi |
| 65000 | Unicode UTF-7 |
| 65001 | Unicode UTF-8 |

 The following is a list of valid code page identifiers for Mac OS only:

|  |  |
| --- | --- |
| Identifier | Name |
| 1 | ASCII |
| 2 | NEXTSTEP |
| 3 | JapaneseEUC |
| 4 | UTF8 |
| 5 | ISOLatin1 |
| 6 | Symbol |
| 7 | NonLossyASCII |
| 8 | ShiftJIS |
| 9 | ISOLatin2 |
| 10 | Unicode |
| 11 | WindowsCP1251 |
| 12 | WindowsCP1252 |
| 13 | WindowsCP1253 |
| 14 | WindowsCP1254 |
| 15 | WindowsCP1250 |
| 21 | ISO2022JP |
| 30 | MacOSRoman |
| 10 | UTF16String |
| 0x90000100 | UTF16BigEndian |
| 0x94000100 | UTF16LittleEndian |
| 0x8c000100 | UTF32String |
| 0x98000100 | UTF32BigEndian |
| 0x9c000100 | UTF32LittleEndian |
| 65536 | Proprietary |

**LicenseInfo**: Information about the current license.When queried, this setting will return a string containing information about the license this instance of a struct is using. It will return the following information:

- Product: The product the license is for.
- Product Key: The key the license was generated from.
- License Source: Where the license was found (e.g., RuntimeLicense, License File).
- License Type: The type of license installed (e.g., Royalty Free, Single Server).
- Last Valid Build: The last valid build number for which the license will work.

**MaskSensitiveData**: Whether sensitive data is masked in log messages.In certain circumstances it may be beneficial to mask sensitive data, like passwords, in log messages. Set this to *true* to mask sensitive data. The default is *true*.

**UseInternalSecurityAPI**: Whether or not to use the system security libraries or an internal implementation. When set to *false*, the struct will use the system security libraries by default to perform cryptographic functions where applicable.

Setting this configuration setting to *true* tells the struct to use the internal implementation instead of using the system security libraries.

 On Windows, this setting is set to *false* by default. On Linux/macOS, this setting is set to *true* by default.

 To use the system security libraries for Linux, OpenSSL support must be enabled. For more information on how to enable OpenSSL, please refer to the [OpenSSL Notes](platforms.md) section.

# Trappable Errors ([SDA](#struct-ipworkspgpsda) Struct)

 **Errors**

The following errors may be generated by the struct. Note that frequently the error message will contain more specific information than what is listed here.

Note that some non-fatal errors may be trapped and explicitly ignored in the [on_error](#on_error-event-sda-struct) event. This will allow the struct to continue operation even in case of error.

### SDA Errors

|  |  |
| --- | --- |
| 105 | Password is required to create SDA. |
| 111 | Can't open file for read. |
| 112 | Can't open file for write. |
| 115 | Can't create empty archive. |
| 118 | The maximum size of the archive has been exceeded. |
| 119 | The archive must be specified. |
| 120 | The component is busy. |
| 150 | An I/O error has occurred (details follow). |
| 151 | Cannot find resource (details follow). |
| 152 | Cannot update resource (details follow). |
