# AutoUninstallAction

Import: `import com.install4j.api.actions.AutoUninstallAction;`

```java
interface AutoUninstallAction extends UninstallAction
```

If you write an installation action that wants to be automatically invoked in the uninstaller to
revert its changes, you can additionally implement this interface. The additional
methods of this interface give you access to a persistent store that can be used at installation time
to save information about any performed changes. At uninstallation time, you can use the persistent store to
load this information again. Each instance of an action has a separate persistent store.

Auto-uninstall actions have their `uninstall` method invoked by the "Uninstall files" action
before any files are uninstalled and in the reverse order in which they were invoked in the installer.
If no "Uninstall files" action is present in the uninstaller, the `uninstall` method will not
be called.

Note: If you add an auto-uninstall action to the uninstaller, its `AutoUninstallAction` interface
will be ignored.

## Inherited from

- [UninstallAction](UninstallAction.md) — 1 methods
- [Action](Action.md) — 1 methods

## Methods

| Signature | Returns | Description |
|---|---|---|
| [`getPersistentProperties()`](#getpersistentproperties) | `Properties` | The framework invokes this method in the installer just before the installer exits to get the persistent properties of the installation action. |
| [`setPersistentProperties(Properties)`](#setpersistentproperties-properties) | `void` | The framework invokes this method in the uninstaller at the beginning of the "Uninstall files" action to restore the persistent properties that were saved in the installer. |

### getPersistentProperties()

```java
Properties getPersistentProperties()
```

The framework invokes this method in the installer just before the installer exits to get the persistent properties
of the installation action.


**Returns:** the persistent properties

### setPersistentProperties(Properties)

```java
void setPersistentProperties(Properties properties)
```

The framework invokes this method in the uninstaller at the beginning of the "Uninstall files" action to restore the persistent
properties that were saved in the installer.


**Parameters:**

- `properties` — the persistent properties

