wails/website/docs/reference
Lea Anthony e3dbe294f2 fix: Add Windows UAC execution level support to manifest template
Fixes #4349: Windows admin permissions not persisting between machines

This change adds configurable UAC (User Account Control) execution level
support to the Windows manifest template, allowing developers to specify
admin requirements that persist when executables are distributed.

## Changes Made

### Enhanced Windows Manifest Template
- Added conditional UAC `trustInfo` section to manifest template
- Uses template variable `{{.ExecutionLevel}}` for dynamic configuration
- Backward compatible: no UAC section when execution level not specified

### Project Configuration Support
- Added `WindowsInfo` struct to project configuration
- Added `executionLevel` field for specifying UAC requirements
- Integrated execution level into template data processing

### Template Data Enhancement
- Extended `assetData` struct to include execution level
- Updated template resolution to extract Windows-specific configuration
- Maintained backward compatibility with existing projects

### Documentation Updates
- Added comprehensive Windows UAC guide with examples
- Updated project configuration reference with Windows options
- Included usage examples and supported execution levels

## Usage

Developers can now specify execution level in wails.json:

```json
{
  "info": {
    "windows": {
      "executionLevel": "requireAdministrator"
    }
  }
}
```

Supported values:
- `requireAdministrator`: Requires admin privileges
- `asInvoker`: Runs with invoker's privileges
- `highestAvailable`: Runs with highest available privileges

## Testing

Verified that:
- UAC trustInfo section is properly embedded in Windows executables
- Admin privileges persist when executables are copied between machines
- Backward compatibility maintained for existing projects
- Template processing works correctly during build

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-06-12 22:03:07 +10:00
..
runtime Fix typos (#3628) 2024-08-20 19:22:43 +10:00
_category_.json [v2] Docs update 2021-09-27 19:35:30 +10:00
cli.mdx update cli doc for -skipembedcreate 2025-03-19 15:16:27 +08:00
menus.mdx Fixed example for macOS menu (#3847) 2024-11-07 06:42:20 +11:00
options.mdx feat: add option to disable panic recovery in message processing 2025-03-13 00:06:07 +00:00
project-config.mdx fix: Add Windows UAC execution level support to manifest template 2025-06-12 22:03:07 +10:00