# How to encrypt and decrypt files using FenixPyre Standalone Encryption Utility?

### Installation

Follow these steps to install the FenixPyre tool service:

1. **Extract the Utility:** Unzip the downloaded `fenixpyre_standalone_enc_dec_tool_v1.x.x.zip` file to a location on your computer (e.g., `C:\Tools\FenixPyre`).
2. **Open PowerShell as Administrator:** Search for PowerShell, right-click it, and select "Run as administrator". This is necessary to install system services.
3. **Navigate to the Tool Directory:** In the PowerShell window, change the current directory to where you extracted the tool. For example:

   ```powershell
   cd C:\Tools\FenixPyre
   ```
4. **Download the certificate:** Get the certificate from FenixPyre support and place it in the extracted zip folder. Rename the certificate to `FenixPyreSACert.pfx` . ***Without the certificate the installation will not succeed.***
5. **Run the Installation Script:** Execute the installation script `FPEncDecServiceInstall.ps1` with the `install` action, providing your specific Organization ID (`orgId`) and registration email (`username`). **Important:** Replace `<your org id>` and `<your org email id e.g. admin@orgid.com>` with your actual details before running the command.

   ```powershell
   .\FPEncDecServiceInstall.ps1 -action install -orgId <your org id> -username <your org email id e.g. admin@orgid.com>
   ```

   This command installs the `FPEncDecService` Windows service and registers the tool.

### Configuration and Operation

Once installed, you configure the tool's actions using Windows Registry settings:

1. **Specify Target Folders:**

   * Open the Windows Registry Editor (regedit.exe).
   * Navigate to: `HKEY_LOCAL_MACHINE\SOFTWARE\FPEncDecTool`

   &#x20;                                                 <img src="/files/qXF9Mc6RHEGz3U0RjKqX" alt="" data-size="original">

   * Find the `FolderPath` key.
   * Modify this value to include the full path(s) of the folder(s) you want the tool to process (encrypt, decrypt, load file keys or report on). If you need multiple paths, this value supports multi-string input. For example:&#x20;

   <figure><img src="/files/BhkpvfigPfTt6gxUOy0l" alt="" width="370"><figcaption></figcaption></figure>
2. **Set the Desired Action:**
   * In the same registry location (`HKEY_LOCAL_MACHINE\SOFTWARE\FPEncDecTool`), find the `Action` value.
   * Modify this value to specify what the tool should do:
     * Set it to `ENCRYPT` to encrypt the files in the specified `FolderPath`.
     * Set it to `DECRYPT` to decrypt the files.
     * Set it to `REPORT` to generate a report on the files without modifying them.
     * Set it to  `LOADKEYS`   to import the file keys you received from FenixPyre Support into the local secure database.
   * Once you set this value, the service will automatically pick up the action and start processing.

### Monitoring Progress

You can monitor the tool's activity and progress:

1. **Check the Log File:** The tool logs its activities dynamically. You can view the log file for real-time updates and troubleshooting information at:
   1. `C:\Users\Public\FPEncDecTool\FPEncDecService.log`
   2. `C:\Users\Public\FPEncDecTool\FPEncDecLib.log`
2. **Monitor Registry Status:**
   * Check the `DetailedStatus` registry value at `HKEY_LOCAL_MACHINE\SOFTWARE\FPEncDecTool` for detailed JSON updates on the ongoing process.
   * Monitor the `Action` registry value. The service will update it to indicate progress (e.g., `ENCRYPT_IN_PROGRESS`).
3. **Wait for Completion:** The operation is finished when the `Action` registry value is updated to show the completed status, such as `ENCRYPT_DONE`, `DECRYPT_DONE`, or `REPORT_DONE`.

### Important Notes

* During encryption, the tool syncs the encryption keys to our SAAS platform. It is important to allow the key syncing to complete before you can access the file or decrypt the file. Do not uninstall or delete any files in `C:\Users\Public\FPEncDecTool` folder before the key syncing is complete.
* To verify that the files are being encrypted, you can download a report from the FenixPyre admin dashboard page, under **Reports**. Select the user and the time range and click on **Download**.
* Perform decryption only after the key syncing is done. The key syncing is fairly fast, but please ensure to provide sufficient time to sync the keys before decrypting.

### Uninstallation

<mark style="color:red;">**Note: Do not uninstall the tool before the encryption keys sync to the FenixPyre Cloud. Please take a backup copy of**</mark><mark style="color:red;">**&#x20;**</mark><mark style="color:red;">**`C:\Users\Public\FPEncDecTool`**</mark><mark style="color:red;">**&#x20;**</mark><mark style="color:red;">**folder before uninstallation.**</mark>

To uninstall the FenixPyre Standalone Encryption Utility:

1. **Important Pre-Check:** Before uninstalling, ensure that all encryption keys and file logs have been fully synchronized with the FenixPyre backend/cloud SAAS service. **Failure to do this may result in permanent data loss**, as you might be unable to decrypt files whose keys were not synced before the local database was removed during uninstallation. (Refer to [Known Issues](/fenixpyre-for-admins/admin-dashboard/fenixpyre-standalone-encryption-utility/limitations-faq-and-best-practices.md)).
2. **Open PowerShell as Administrator:** As during installation, open an administrative PowerShell window.
3. **Navigate to the Tool Directory:** Use the `cd` command to go to the folder where `FPEncDecServiceInstall.ps1` is located.
4. **Run the Uninstallation Script:** Execute the script with the `uninstall` action:

   ```powershell
   .\FPEncDecServiceInstall.ps1 -action uninstall
   ```

   This will stop and remove the `FPEncDecService` Windows service and perform cleanup operations.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.fenixpyre.com/fenixpyre-for-admins/admin-dashboard/fenixpyre-standalone-encryption-utility/how-to-encrypt-and-decrypt-files-using-fenixpyre-standalone-encryption-utility.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
