From 4250d61c02b1a6e8a073b5f3223b0deb0856be63 Mon Sep 17 00:00:00 2001 From: Belim Date: Sun, 7 Sep 2025 15:45:36 +0200 Subject: [PATCH] Create Write-an-Extension.md --- Write-an-Extension.md | 38 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) create mode 100644 Write-an-Extension.md diff --git a/Write-an-Extension.md b/Write-an-Extension.md new file mode 100644 index 0000000..5c9a18b --- /dev/null +++ b/Write-an-Extension.md @@ -0,0 +1,38 @@ +🆕 Setup Extensions: Host + Options Support +------------------------------------------- +The Setup Extensions system now supports extended script metadata in the header. +This allows script authors to define dropdown menus and control how the script is executed. + +✅ New Metadata Parameters: + + # Description: + • Short, user-friendly description of what the script does. + • Displayed in the Extensions page below the title. + + # Host: embedded | console + • embedded = run inside OOBE, output is captured and shown in the app. + • console = run in an external PowerShell window with -NoExit. + • Default: embedded (if not specified). + + # Options: value1; value2; value3; ... + • Defines multiple selectable actions for a single script. + • A dropdown is automatically shown in the Extensions page. + • The selected value is passed to the script as $choice. + +Example Script Header: + + # Description: File Explorer tweaks + # Host: embedded + # Options: Show file extensions; Hide file extensions; Open This PC + + param([string]$choice) + switch ($choice) { + "Show file extensions" { ... } + "Hide file extensions" { ... } + "Open This PC" { ... } + } + +------------------------------------------- +With this update, one script can now provide multiple user actions, +and devs can control whether output stays inside the OOBE app +or opens in a real console window.