# pseymour/makemeadmin architecture

> Architecture diagram of the GitHub repository pseymour/makemeadmin, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2025-06-20). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/pseymour/makemeadmin
- Repository: https://github.com/pseymour/makemeadmin

## Overview

##### Project type and purpose
- This is a Windows “system-level” tool composed of several .NET assemblies: desktop UIs, a Windows Service, shared libraries, and an MSI/WiX‐based installer. Its sole purpose is to let standard users request temporary elevation to administrator rights.

##### File structure
- Top-level assemblies (projects) fall into these categories:
- Shared Code (class libraries):
– Enumerations (common enums)
– Logging (centralized logging, multilingual resources)
– LsaLogonSessions (native OS interop for session/token info)
– ProcessCommunication (IPC abstractions for UI↔Service)
– Settings (user and syslog configuration)
- Executable Components:
– Service (MakeMeAdminService) – runs as a Windows Service, grants elevation
– UserRequestApp (LocalUI) – local UI for interactive elevation requests
– RemoteUI – remote-capable UI for networked elevation requests
– TestCode – sample/test harness
- Installer Components:
– WiXCustomAction – custom code run during MSI install
– Setup (WiX project) – MSI definitions, Group Policy ADMX/ADML files
– Installers folder – compiled MSI binaries by locale/architecture
- Configuration files: app.config in each .exe or lib; WiX .wxl/.wxs files for localization.

##### README insights
- Confirms the tool’s goal: “temporary elevation to admin.”
- Points to a Wiki for deeper architecture or usage details.

## Diagram (Mermaid)

```mermaid
flowchart TD
    %% Presentation Layer
    subgraph "Presentation Layer"
        direction TB
        LocalUI["LocalUI (UserRequestApp.exe)"]:::presentation
        RemoteUI["RemoteUI.exe"]:::presentation
        TestHarness["TestCode.exe"]:::presentation
    end

    %% Service Layer
    subgraph "Service Layer"
        direction TB
        Service["MakeMeAdminService.exe"]:::service
    end

    %% Communication Layer
    subgraph "Communication Layer"
        direction TB
        IPC["ProcessCommunication.dll"]:::ipc
    end

    %% OS Interop Layer
    subgraph "OS Interop Layer"
        direction TB
        Lsa["LsaLogonSessions.dll"]:::osinterop
        Native["NativeMethods"]:::osinterop
    end

    %% Shared Services
    subgraph "Shared Libraries"
        direction TB
        LoggingLib["Logging.dll"]:::shared
        SettingsLib["Settings.dll"]:::shared
        EnumsLib["Enumerations.dll"]:::shared
    end

    %% Installer Subsystem
    subgraph "Installer Subsystem"
        direction TB
        WixProj["Setup.wixproj"]:::installer
        CustomAction["WiXCustomAction.dll"]:::installer
        InstallersFolder["Installers/"]:::installer
    end

    %% Interactions
    LocalUI -->|"calls client API"| IPC
    RemoteUI -->|"calls client API"| IPC
    IPC -->|"sends request"| Service
    Service -->|"validates via Settings"| SettingsLib
    Service -->|"elevate token via LSA"| Lsa
    Service -->|"invoke native APIs"| Native
    Service -->|"log event"| LoggingLib
    Service -->|"respond via IPC"| IPC
    IPC -->|"delivers response"| LocalUI
    IPC -->|"delivers response"| RemoteUI

    LocalUI -->|uses| LoggingLib
    LocalUI -->|uses| EnumsLib
    RemoteUI -->|uses| LoggingLib
    RemoteUI -->|uses| EnumsLib

    %% Installer Flow
    WixProj -->|builds MSI| InstallersFolder
    InstallersFolder -->|install-time hook| CustomAction
    CustomAction -->|configures service & ADMX| Service
    CustomAction -->|writes registry/policies| SettingsLib

    %% Test Harness
    TestHarness -->|"test communication"| IPC
    TestHarness -->|uses| Lsa
    TestHarness -->|uses| LoggingLib

    %% Click Events
    click EnumsLib "https://github.com/pseymour/makemeadmin/blob/master/Enumerations/Enumerations.csproj"
    click LoggingLib "https://github.com/pseymour/makemeadmin/blob/master/Logging/Logging.csproj"
    click Lsa "https://github.com/pseymour/makemeadmin/blob/master/LsaLogonSessions/LsaLogonSessions.csproj"
    click IPC "https://github.com/pseymour/makemeadmin/blob/master/ProcessCommunication/ProcessCommunication.csproj"
    click SettingsLib "https://github.com/pseymour/makemeadmin/blob/master/Settings/Settings.csproj"
    click Service "https://github.com/pseymour/makemeadmin/blob/master/Service/Service.csproj"
    click LocalUI "https://github.com/pseymour/makemeadmin/blob/master/UserRequestApp/LocalUI.csproj"
    click RemoteUI "https://github.com/pseymour/makemeadmin/blob/master/RemoteUI/RemoteUI.csproj"
    click TestHarness "https://github.com/pseymour/makemeadmin/blob/master/TestCode/TestCode.csproj"
    click CustomAction "https://github.com/pseymour/makemeadmin/blob/master/WiXCustomAction/WiXCustomAction.csproj"
    click WixProj "https://github.com/pseymour/makemeadmin/blob/master/Setup/Setup.wixproj"
    click InstallersFolder "https://github.com/pseymour/makemeadmin/tree/master/Installers/"

    %% Styles
    classDef presentation fill:#ADD8E6,stroke:#333,stroke-width:1px
    classDef service fill:#90EE90,stroke:#333,stroke-width:1px
    classDef ipc fill:#FFA500,stroke:#333,stroke-width:1px
    classDef osinterop fill:#FFFF99,stroke:#333,stroke-width:1px
    classDef shared fill:#D8BFD8,stroke:#333,stroke-width:1px
    classDef installer fill:#D3D3D3,stroke:#333,stroke-width:1px
```
