{
  "$schema": "http://json-schema.org/draft-07/schema#",
  "title": "SEQRED Windows unattend.xml generator config",
  "description": "Flat config object consumed by generateAutounattendXml() (src/lib/unattend/generate.ts). Paste a JSON object matching this schema into the tool's \"JSON\" panel (or build the file directly from this schema) to produce a valid autounattend.xml with zero manual clicking. Properties marked \"x-unofficial\": true are community-sourced registry tweaks that Microsoft does not document; they are hidden behind an explicit opt-in in the UI.",
  "type": "object",
  "additionalProperties": false,
  "properties": {
    "preset": {
      "type": "string",
      "title": "Starting preset",
      "description": "Which starting preset populated the other fields. Informational only - editing other fields after picking a preset is expected.",
      "default": "blank",
      "enum": ["minimal", "debloatPrivacy", "blank"],
      "x-enumLabels": {
        "minimal": "Minimal (bypass checks, local admin, no bloat removal)",
        "debloatPrivacy": "Debloat + privacy (adds tweaks + bloatware removal)",
        "blank": "Blank (start from scratch)"
      },
      "x-step": "presets"
    },
    "uiLanguage": {
      "type": "string",
      "title": "Setup UI language",
      "description": "BCP-47 language tag used by Windows Setup itself, e.g. en-US, pl-PL, de-DE.",
      "default": "en-US",
      "x-step": "region"
    },
    "inputLocales": {
      "type": "array",
      "title": "Keyboard input locales",
      "description": "Up to 3 keyboard layout identifiers in \"LangID:KeyboardID\" form, e.g. \"0409:00000409\" (US). First entry is the default layout.",
      "default": ["0409:00000409"],
      "items": {
        "type": "string"
      },
      "maxItems": 3,
      "x-step": "region"
    },
    "systemLocale": {
      "type": "string",
      "title": "System locale",
      "description": "BCP-47 tag for the locale used for non-Unicode programs, e.g. en-US.",
      "default": "en-US",
      "x-step": "region"
    },
    "userLocale": {
      "type": "string",
      "title": "User locale",
      "description": "BCP-47 tag for formats (date/time/number/currency), e.g. en-US.",
      "default": "en-US",
      "x-step": "region"
    },
    "geoLocation": {
      "type": "string",
      "title": "Geographic location (GeoID)",
      "description": "Windows numeric GeoID string, e.g. \"244\" for the United States, \"191\" for Poland. Applied as the home location of the first signed-in user at first logon (Set-WinHomeLocation).",
      "default": "244",
      "x-step": "region"
    },
    "timezone": {
      "type": "string",
      "title": "Time zone",
      "description": "Windows time zone display name, e.g. \"Pacific Standard Time\", \"Central European Standard Time\".",
      "default": "UTC",
      "x-step": "region"
    },
    "productKeyMode": {
      "type": "string",
      "title": "Product key mode",
      "description": "How to supply a product key: a well-known generic/KMS-client key for the chosen edition, a custom key, or none.",
      "default": "generic",
      "enum": ["generic", "custom", "none"],
      "x-enumLabels": {
        "generic": "Generic (KMS client) key for edition",
        "custom": "Custom product key",
        "none": "No product key (prompt during setup)"
      },
      "x-step": "edition"
    },
    "editionId": {
      "type": "string",
      "title": "Windows edition",
      "description": "Target edition, used to look up the generic KMS client setup key. Only used when productKeyMode is \"generic\" - the generic key only activates the exact edition it matches, so this must reflect the ISO/media you are actually installing.",
      "default": "Professional",
      "enum": [
        "Home",
        "Professional",
        "ProfessionalN",
        "ProfessionalEducation",
        "Education",
        "Enterprise",
        "EnterpriseN"
      ],
      "x-enumLabels": {
        "Home": "Windows Home",
        "Professional": "Windows Pro",
        "ProfessionalN": "Windows Pro N",
        "ProfessionalEducation": "Windows Pro Education",
        "Education": "Windows Education",
        "Enterprise": "Windows Enterprise",
        "EnterpriseN": "Windows Enterprise N"
      },
      "x-step": "edition",
      "x-dependsOn": {
        "field": "productKeyMode",
        "equals": "generic"
      }
    },
    "customProductKey": {
      "type": "string",
      "title": "Custom product key",
      "description": "25-character retail/volume product key (XXXXX-XXXXX-XXXXX-XXXXX-XXXXX), used only when productKeyMode is \"custom\". The key must match the edition on the installation media or Setup will reject it during specialization.",
      "default": "",
      "x-step": "edition",
      "x-dependsOn": {
        "field": "productKeyMode",
        "equals": "custom"
      },
      "x-hiddenNote": "When productKeyMode is not \"custom\", Windows will either prompt for a key during setup, or activate automatically if the device is already entitled (an OEM/digital license tied to the hardware)."
    },
    "diskMode": {
      "type": "string",
      "title": "Disk layout",
      "description": "automaticGpt creates an EFI + MSR + Windows (NTFS) GPT layout; singlePartition creates one full-disk NTFS partition (BIOS/MBR-style); automaticGptRecovery adds a dedicated WinRE Recovery partition after Windows, per current Microsoft partition guidance - this requires a fixed windowsPartitionSizeGb, since only one partition on the disk can extend to fill it and Recovery must be that one.",
      "default": "automaticGpt",
      "enum": ["automaticGpt", "singlePartition", "automaticGptRecovery"],
      "x-enumLabels": {
        "automaticGpt": "Automatic - GPT (EFI + MSR + Windows)",
        "singlePartition": "Single partition (whole disk)",
        "automaticGptRecovery": "Automatic - GPT with Recovery partition (requires a fixed Windows partition size)"
      },
      "x-step": "disk"
    },
    "diskId": {
      "type": "number",
      "title": "Target disk index",
      "description": "Zero-based index of the disk Windows Setup should wipe and install to (DiskID in DiskConfiguration).",
      "default": 0,
      "x-step": "disk"
    },
    "windowsPartitionSizeGb": {
      "type": "number",
      "title": "Windows partition size (GB)",
      "description": "Fixed size of the Windows partition in GB, only used when diskMode is automaticGptRecovery. The Recovery partition must sit immediately after Windows (Microsoft partition guidance), so Windows can no longer simply extend to fill the disk - it needs a real, fixed size, and Recovery takes the remaining space.",
      "default": 100,
      "x-step": "disk",
      "x-dependsOn": {
        "field": "diskMode",
        "equals": "automaticGptRecovery"
      },
      "x-hiddenNote": "Only relevant for the GPT-with-Recovery disk layout, where the Windows partition needs a fixed size so Recovery can be placed immediately after it."
    },
    "bypassTpmCheck": {
      "type": "boolean",
      "title": "Bypass TPM 2.0 requirement",
      "description": "Sets HKLM\\SYSTEM\\Setup\\LabConfig\\BypassTPMCheck=1 during WinPE so Setup ignores the TPM 2.0 check. Lets Windows 11 install on hardware without a TPM 2.0 chip, but Microsoft may withhold future feature updates on unsupported devices, and Microsoft support may be limited. Experimental: no official Microsoft support. Test the result before relying on it.",
      "default": false,
      "x-step": "setup",
      "x-experimental": true
    },
    "bypassSecureBootCheck": {
      "type": "boolean",
      "title": "Bypass Secure Boot requirement",
      "description": "Sets HKLM\\SYSTEM\\Setup\\LabConfig\\BypassSecureBootCheck=1 during WinPE. Lets Setup proceed on firmware with Secure Boot disabled or unavailable, at the cost of the boot-chain integrity protection Secure Boot provides. Experimental: no official Microsoft support. Test the result before relying on it.",
      "default": false,
      "x-step": "setup",
      "x-experimental": true
    },
    "bypassRamCheck": {
      "type": "boolean",
      "title": "Bypass RAM requirement",
      "description": "Sets HKLM\\SYSTEM\\Setup\\LabConfig\\BypassRAMCheck=1 during WinPE, letting Setup proceed on devices with less than the 4 GB Windows 11 normally requires. Performance may suffer on very low-RAM hardware. Experimental: no official Microsoft support. Test the result before relying on it.",
      "default": false,
      "x-step": "setup",
      "x-experimental": true
    },
    "bypassCpuCheck": {
      "type": "boolean",
      "title": "Bypass CPU requirement",
      "description": "Sets HKLM\\SYSTEM\\Setup\\LabConfig\\BypassCPUCheck=1 during WinPE, allowing installation on CPU models Microsoft did not certify for Windows 11 (older generation processors). Experimental: no official Microsoft support. Test the result before relying on it.",
      "default": false,
      "x-step": "setup",
      "x-experimental": true
    },
    "bypassNRO": {
      "type": "boolean",
      "title": "Additional network requirement bypass (BypassNRO)",
      "description": "Community method, not documented by Microsoft. Microsoft has announced it is removing such mechanisms and may disable it without notice. When on, the file writes the BypassNRO registry value in the specialize pass, hides the online account and wireless screens in OOBE and requires at least one predefined local account. In our tests on build 26300 the predefined local account reached the desktop without this option too. Experimental: no official Microsoft support. Test the result before relying on it.",
      "default": false,
      "x-step": "setup",
      "x-experimental": true
    },
    "skipEula": {
      "type": "boolean",
      "title": "Skip EULA page",
      "description": "Sets AcceptEula=true in Windows Setup UserData and HideEULAPage=true in OOBE. The answer file accepts the licence terms on the user's behalf, so use it only where the person running the setup has the right to accept them.",
      "default": true,
      "x-step": "setup"
    },
    "computerNameMode": {
      "type": "string",
      "title": "Computer name mode",
      "description": "auto generates a random name, manual uses computerName, prompt leaves ComputerName unset so Setup asks.",
      "default": "auto",
      "enum": ["auto", "manual", "prompt"],
      "x-enumLabels": {
        "auto": "Generate random name",
        "manual": "Use a specific name",
        "prompt": "Leave blank - Setup will prompt"
      },
      "x-step": "computerName"
    },
    "computerName": {
      "type": "string",
      "title": "Computer name",
      "description": "Used only when computerNameMode is \"manual\". NetBIOS limits this to 15 characters, no spaces - longer values are truncated by Windows.",
      "default": "",
      "x-step": "computerName",
      "x-dependsOn": {
        "field": "computerNameMode",
        "equals": "manual"
      }
    },
    "userNames": {
      "type": "array",
      "title": "Local account names",
      "description": "Up to 5 local account usernames, created in the order given.",
      "default": ["Admin"],
      "items": {
        "type": "string"
      },
      "maxItems": 5,
      "x-step": "users"
    },
    "userPasswords": {
      "type": "array",
      "title": "Local account passwords",
      "description": "Passwords parallel to userNames, same order/length. Stored in browser memory only, never persisted. Stripped from exported/saved JSON config by default (opt-in to include).",
      "default": [""],
      "items": {
        "type": "string"
      },
      "maxItems": 5,
      "x-step": "users",
      "x-sensitive": true
    },
    "userGroups": {
      "type": "array",
      "title": "Local account groups",
      "description": "Group parallel to userNames: \"Administrators\" or \"Users\".",
      "default": ["Administrators"],
      "items": {
        "type": "string"
      },
      "maxItems": 5,
      "x-step": "users"
    },
    "obscurePasswords": {
      "type": "boolean",
      "title": "Obscure passwords in XML (base64, PlainText=false)",
      "description": "When true, passwords are base64-encoded with the \"Password\" suffix per the unattend spec and PlainText is set to false. This is obfuscation, NOT encryption - anyone with the file can reverse it.",
      "default": false,
      "x-step": "users"
    },
    "autoLogonUser": {
      "type": "string",
      "title": "Auto-logon username",
      "description": "If set, must exactly match one of userNames - Windows then logs this user on automatically after setup instead of showing the logon screen. Anyone with physical/console access to the machine reaches a signed-in desktop with no prompt, so only use this for kiosks, labs, or images you fully control.",
      "default": "",
      "x-step": "users"
    },
    "passwordNeverExpires": {
      "type": "boolean",
      "title": "Local accounts: password never expires",
      "description": "Applies \"net accounts\" / user flag equivalent via a first-logon command so created local accounts do not get forced to rotate passwords.",
      "default": true,
      "x-step": "users"
    },
    "expressSettings": {
      "type": "string",
      "title": "OOBE express settings (privacy/telemetry)",
      "description": "Maps to the OOBE ProtectYourPC setting: disableAll picks the most private option, enableAll accepts recommended (data-sharing) defaults, default leaves the choice to the interactive OOBE flow.",
      "default": "disableAll",
      "enum": ["disableAll", "enableAll", "default"],
      "x-enumLabels": {
        "disableAll": "Disable all (most private)",
        "enableAll": "Enable all (recommended/default MS settings)",
        "default": "Default - do not set, let OOBE ask"
      },
      "x-step": "oobePrivacy"
    },
    "wifiSkip": {
      "type": "boolean",
      "title": "Skip Wi-Fi setup screen in OOBE",
      "description": "Sets HideWirelessSetupInOOBE=true. When false and wifiSsid is provided, a WLAN profile is imported via netsh in a first-logon command instead.",
      "default": true,
      "x-step": "wifi"
    },
    "wifiSsid": {
      "type": "string",
      "title": "Wi-Fi network name (SSID)",
      "description": "Used only when wifiSkip is false. A WPA2-PSK WLAN profile is generated and imported with netsh in a first-logon command - only WPA2-Personal networks are supported, not enterprise/802.1X Wi-Fi.",
      "default": "",
      "x-step": "wifi",
      "x-dependsOn": {
        "field": "wifiSkip",
        "equals": false
      },
      "x-hiddenNote": "The wireless setup screen in OOBE will simply be skipped - the user connects to Wi-Fi after first logon, the normal way."
    },
    "wifiPassword": {
      "type": "string",
      "title": "Wi-Fi password",
      "description": "WPA2-PSK pre-shared key for wifiSsid. Stored in browser memory only, and written in plain text into the generated XML/script - treat the exported file as sensitive.",
      "default": "",
      "x-step": "wifi",
      "x-dependsOn": {
        "field": "wifiSkip",
        "equals": false
      },
      "x-sensitive": true
    },
    "tweakDisableUAC": {
      "type": "boolean",
      "title": "Disable UAC prompts",
      "description": "Sets EnableLUA=0 in HKLM policy (first-logon script). Reduces security - use only for lab/test images.",
      "default": false,
      "x-step": "tweaks"
    },
    "tweakDisableUpdateRestartNag": {
      "type": "boolean",
      "title": "Disable Windows Update auto-restart nag",
      "description": "Sets NoAutoRebootWithLoggedOnUsers=1 under the WindowsUpdate\\AU policy key.",
      "default": false,
      "x-step": "tweaks"
    },
    "tweakEnableRDP": {
      "type": "boolean",
      "title": "Enable Remote Desktop",
      "description": "Sets fDenyTSConnections=0 and opens the firewall rule group \"remote desktop\". Exposes port 3389 on the local network (or the internet, if the machine is directly reachable) - pair with a strong account password.",
      "default": false,
      "x-step": "tweaks"
    },
    "tweakShowFileExtensions": {
      "type": "boolean",
      "title": "Show file extensions in Explorer",
      "description": "Sets HideFileExt=0 for the default user profile hive. Unofficial: community-verified, not documented by Microsoft. Not covered by this tool's documented-components guarantee.",
      "default": false,
      "x-step": "tweaks",
      "x-unofficial": true
    },
    "tweakShowHiddenFiles": {
      "type": "boolean",
      "title": "Show hidden files in Explorer",
      "description": "Sets Hidden=1 for the default user profile hive. Unofficial: community-verified, not documented by Microsoft. Not covered by this tool's documented-components guarantee.",
      "default": false,
      "x-step": "tweaks",
      "x-unofficial": true
    },
    "tweakDarkMode": {
      "type": "boolean",
      "title": "Enable dark mode",
      "description": "Sets AppsUseLightTheme=0 and SystemUsesLightTheme=0 for the default user profile hive. Unofficial: community-verified, not documented by Microsoft. Not covered by this tool's documented-components guarantee.",
      "default": false,
      "x-step": "tweaks",
      "x-unofficial": true
    },
    "tweakDisableWidgets": {
      "type": "boolean",
      "title": "Disable taskbar Widgets",
      "description": "Sets TaskbarDa=0 for the default user profile hive. Unofficial: community-verified, not documented by Microsoft. Not covered by this tool's documented-components guarantee.",
      "default": false,
      "x-step": "tweaks",
      "x-unofficial": true
    },
    "tweakTaskbarLeft": {
      "type": "boolean",
      "title": "Align taskbar icons left",
      "description": "Sets TaskbarAl=0 for the default user profile hive (Windows 11 default is centered = 1). Unofficial: community-verified, not documented by Microsoft. Not covered by this tool's documented-components guarantee.",
      "default": false,
      "x-step": "tweaks",
      "x-unofficial": true
    },
    "tweakDisableBingSearch": {
      "type": "boolean",
      "title": "Disable Bing/web results in Start search",
      "description": "Sets BingSearchEnabled=0 and CortanaConsent=0 for the default user profile hive. Unofficial: community-verified, not documented by Microsoft. Not covered by this tool's documented-components guarantee.",
      "default": false,
      "x-step": "tweaks",
      "x-unofficial": true
    },
    "communityDesktopIcons": {
      "type": "array",
      "title": "Hide desktop icons",
      "description": "CLSIDs of default desktop icons to hide, via the undocumented HideDesktopIcons\\NewStartPanel key for the default user profile hive. Values: thisPC, recycleBin, controlPanel, userFiles, network. Unofficial: community-verified, not documented by Microsoft. Not covered by this tool's documented-components guarantee.",
      "default": [],
      "items": {
        "type": "string"
      },
      "enum": ["thisPC", "recycleBin", "controlPanel", "userFiles", "network"],
      "x-enumLabels": {
        "thisPC": "This PC",
        "recycleBin": "Recycle Bin",
        "controlPanel": "Control Panel",
        "userFiles": "User's Files",
        "network": "Network"
      },
      "x-step": "tweaks",
      "x-unofficial": true
    },
    "communityVisualEffects": {
      "type": "string",
      "title": "Visual effects",
      "description": "Sets the UserPreferencesMask bit-31 master switch (Microsoft-documented, but only on an archived registry reference page) plus the undocumented VisualFXSetting value, for the default user profile hive. Unofficial: community-verified, not documented by Microsoft. Not covered by this tool's documented-components guarantee.",
      "default": "default",
      "enum": ["default", "bestAppearance", "bestPerformance"],
      "x-enumLabels": {
        "default": "Let Windows decide",
        "bestAppearance": "Best appearance",
        "bestPerformance": "Best performance"
      },
      "x-step": "tweaks",
      "x-unofficial": true
    },
    "bloatwarePackages": {
      "type": "array",
      "title": "AppX packages to remove",
      "description": "Package family name fragments passed to Get-AppxPackage in a first-logon PowerShell command.",
      "default": [],
      "items": {
        "type": "string"
      },
      "x-step": "bloatware"
    },
    "appLockerEnabled": {
      "type": "boolean",
      "title": "Apply an AppLocker policy",
      "description": "AppLocker has no native unattend component - this stages the policy XML and runs it as a first-logon PowerShell script: sc.exe config appidsvc start=auto (the Application Identity service must be running for AppLocker to enforce anything) then Set-AppLockerPolicy -XmlPolicy against the staged file.",
      "default": false,
      "x-step": "script"
    },
    "appLockerPolicyXml": {
      "type": "string",
      "title": "AppLocker policy XML",
      "description": "The AppLocker policy XML (as exported from the Local Security Policy snap-in or Set-AppLockerPolicy -PolicyObject ... | Export). Only used when appLockerEnabled is true.",
      "default": "",
      "x-step": "script",
      "x-dependsOn": {
        "field": "appLockerEnabled",
        "equals": true
      },
      "x-hiddenNote": "Only relevant when applying an AppLocker policy is enabled above."
    },
    "vmGuestTools": {
      "type": "array",
      "title": "VM guest tools to install",
      "description": "Per-hypervisor guest-tools silent install, run as first-logon commands that search the mounted guest-tools media rather than assuming a fixed drive letter. Hyper-V needs none of these - integration services ship built-in and update via Windows Update.",
      "default": [],
      "items": {
        "type": "string"
      },
      "enum": ["virtualbox", "vmware", "virtio", "parallels"],
      "x-enumLabels": {
        "virtualbox": "VirtualBox Guest Additions",
        "vmware": "VMware Tools",
        "virtio": "VirtIO (KVM/QEMU/Proxmox)",
        "parallels": "Parallels Tools"
      },
      "x-step": "script"
    },
    "customScriptType": {
      "type": "string",
      "title": "Custom script type",
      "description": "Whether customScript is a cmd batch snippet or a PowerShell snippet, run as the last first-logon command.",
      "default": "ps1",
      "enum": ["cmd", "ps1"],
      "x-enumLabels": {
        "cmd": "Batch (cmd.exe)",
        "ps1": "PowerShell"
      },
      "x-step": "script"
    },
    "customScript": {
      "type": "string",
      "title": "Custom first-logon script",
      "description": "Free-text script run once at first logon, after all other tweaks/bloatware removal.",
      "default": "",
      "x-step": "script"
    }
  }
}
