# LouZip GUI - ProfileUnity Archive Manager

## Overview
LouZip GUI is a PowerShell-based Windows Presentation Foundation (WPF) application that provides a graphical interface for the ProfileUnity LouZip.exe utility. It simplifies the management of ProfileUnity archives (.lou, .lbr, and .7z files).

## Features
- **Extract Archives**: Decompress .lou, .lbr, .lbr.lou, and .7z archives
- **Create Archives**: Compress folders into .lou or .7z format
- **List Contents**: View archive contents with optional binary abbreviation
- **Convert Registry**: Convert .lbr archives to .reg registry files
- **Real-time Output**: View command execution results in the integrated console
- **Status Tracking**: Monitor operation status and LouZip availability

## Requirements
- Windows PowerShell 5.0 or higher
- .NET Framework 4.5 or higher
- ProfileUnity with LouZip.exe installed
- Windows 7 or higher

## File Structure
```
Tools\LouZipGUI\
├── LouZipGUI.ps1              # Main application script
├── Launch-LouZipGUI.ps1       # Launcher script
├── Functions\
│   ├── Initialize-GUI.ps1     # GUI initialization functions
│   ├── Invoke-LouZipOperations.ps1  # Core LouZip operations
│   └── Update-Interface.ps1   # UI update functions
├── XAML\
│   └── MainWindow.xaml        # WPF window definition
├── LouZip\                    # Local LouZip executable (optional)
│   └── LouZip.exe
└── README.md                  # Documentation
```

## Installation
1. Copy the entire `LouZipGUI` folder to your ProfileUnity tools directory
2. **Option A**: Place LouZip.exe in the `Tools\LouZipGUI\LouZip\` subfolder (recommended for portability)
3. **Option B**: Ensure ProfileUnity is installed with LouZip.exe in its default location
4. Default search locations (checked in order):
   - `Tools\LouZipGUI\LouZip\LouZip.exe` (local copy)
   - `C:\Program Files\ProfileUnity\Client.NET\LouZip.exe`
   - Additional ProfileUnity installation paths

## Usage

### Basic Launch
```powershell
# Navigate to the tool directory
cd "C:\Tools\LouZipGUI"

# Run the launcher
.\Launch-LouZipGUI.ps1
```

### Advanced Launch Options
```powershell
# Specify custom LouZip path
.\Launch-LouZipGUI.ps1 -LouZipPath "D:\ProfileUnity\LouZip.exe"

# Launch without splash screen
.\Launch-LouZipGUI.ps1 -NoSplash

# Enable verbose output
.\Launch-LouZipGUI.ps1 -Verbose
```

### Direct Script Execution
```powershell
# Run main script directly
.\LouZipGUI.ps1
```

## Operations Guide

### Extract Archive
1. Select the **Extract Archive** tab
2. Browse for source archive (.lou, .lbr, .7z)
3. Select destination folder
4. Click **Extract Files**

### Create Archive
1. Select the **Create Archive** tab
2. Browse for source folder
3. Specify output archive path
4. Choose format (.lou or .7z)
5. Click **Create Archive**

### List Contents
1. Select the **List Contents** tab
2. Browse for archive file
3. Optionally check "Abbreviate binary content"
4. Click **List Contents**
5. View results in the data grid

### Convert Registry
1. Select the **Convert Registry** tab
2. Browse for registry archive (.lbr, .lbr.lou, .lbr.7z)
3. Specify output .reg file path
4. Click **Convert to .REG**

## Command Line Examples
The GUI executes the following LouZip commands:

```powershell
# Extract archive
LouZip.exe /unzip "archive.lou" "C:\destination"

# Create archive
LouZip.exe /zip "C:\source" "archive.lou"

# List contents
LouZip.exe /list "archive.lou" [/abbr]

# Convert registry
LouZip.exe /convert "registry.lbr" "output.reg"
```

## Troubleshooting

### LouZip Not Found
- The tool checks for LouZip.exe in this order:
  1. `Tools\LouZipGUI\LouZip\LouZip.exe` (local subfolder)
  2. `C:\Program Files\ProfileUnity\Client.NET\`
  3. `C:\Program Files (x86)\ProfileUnity\Client.NET\`
  4. `C:\Program Files\Liquidware Labs\ProfileUnity\Client.NET\`
- If not found, the tool will prompt to browse for LouZip.exe
- For portability, place LouZip.exe in `Tools\LouZipGUI\LouZip\` folder

### Permission Issues
- Run PowerShell as Administrator if accessing protected directories
- Ensure write permissions for destination folders

### Execution Policy
If you encounter execution policy errors:
```powershell
Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Scope CurrentUser
```

## Archive Types

### .LOU Files
- ProfileUnity's proprietary archive format
- Optimized for user profile data
- Faster compression/decompression than .7z

### .LBR Files
- Registry backup archives
- Can be converted to .reg files for import
- May be compressed as .lbr.lou or .lbr.7z

### .7Z Files
- Standard 7-Zip archives
- Legacy format for ProfileUnity
- Still supported for compatibility

## Error Codes
Common LouZip exit codes:
- `0`: Success
- `1`: General error
- `2`: File not found
- `3`: Access denied
- `7`: Command line error

## Support
For ProfileUnity and LouZip support:
- Liquidware Support: https://support.liquidware.com
- ProfileUnity Documentation: https://www.liquidware.com/support

## Version History
- 1.0.0 - Initial release with core functionality
  - Extract, Compress, List, and Convert operations
  - WPF-based interface
  - PowerShell 5.x compatibility

## License
This tool is provided as-is for use with licensed ProfileUnity installations.