wails/v2/internal
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
..
app fix(logger): respect log level from environment variable in dev mode (#4083) 2025-05-05 19:09:34 +10:00
binding postfix [] in instance is element accessor, not array type declaration 2025-04-10 08:50:12 -05:00
colour feature/turn off color terminal output of dev command (#1947) 2022-10-20 21:11:20 +11:00
frontend Merge branch 'master' into bugfix/2431_wayland_max_size 2025-04-18 16:39:59 +10:00
fs [chore] lint fixes 2023-11-12 12:30:49 +11:00
github Update dependencies. Fix buildvcs compile error 2025-02-08 12:56:06 +11:00
go-common-file-dialog fix: don't return error when SaveFileDialog is cancelled by the user 2025-04-29 19:46:44 +02:00
gomod [chore] lint fixes 2023-11-12 12:30:49 +11:00
goversion update go minimum version (#3285) 2024-03-24 17:00:11 +11:00
logger [chore] lint fixes 2023-11-12 12:30:49 +11:00
menumanager chore: fix some comments (#3932) 2024-12-06 14:35:46 +11:00
platform Remove all systray related for v2. (#2329) 2023-01-26 18:11:31 +11:00
process [chore] lint fixes 2023-11-12 12:30:49 +11:00
project fix: Add Windows UAC execution level support to manifest template 2025-06-12 22:03:07 +10:00
s fix: close copy dst file (#3384) 2024-04-09 17:34:43 -05:00
shell [chore] lint fixes 2023-11-12 12:30:49 +11:00
signal [chore] lint fixes 2023-11-12 12:30:49 +11:00
staticanalysis Bump the go_modules group across 2 directories with 1 update (#3408) 2024-11-17 20:55:06 +11:00
system Added initial Windows 11-supporting branding 2025-01-21 21:15:24 +02:00
typescriptify postfix [] in instance is element accessor, not array type declaration 2025-04-10 08:50:12 -05:00
webview2runtime [chore] lint fixes 2023-11-12 12:30:49 +11:00
wv2installer [chore] Use webview2 package (#2687) 2023-06-10 17:04:31 +10:00