Chapter 5 of 9 • Wizard UI & Dialogs

MSI SelectionTree, C++ Glass Wizard & MSI.DLL Dialogs

Every project compiled with BuildBootstrapper = true delivers two synchronized user-interface layers: the high-DPI GDI+ SetupWizard.exe external UI for interactive desktop installs, and a complete relational MSI.DLL Dialog SQL sequence inside Product.msi for direct enterprise msiexec /i runs.

Authentic Windows Installer SelectionTree

When a user selects Custom Setup or Maintenance -> Modify, SetupWizard.exe opens the embedded Product.msi read-only and renders an authentic Windows Installer SelectionTree with crisp 32-bit ARGB split-dropdown icons (zero 1-bit white/magenta halos in Dark Mode!):

  • Local Drive Icon: Will be installed on local hard drive.
  • Cascaded Dual-Drive Icon: Entire feature and all subfeatures will be installed locally.
  • Partial Drive Icon: Some subfeatures are selected while others are excluded.
  • On-Demand Badge (1): Feature will be installed when required (when AllowAdvertise = true).
  • Crimson X Icon: Entire feature will be unavailable (automatically blocked when DisallowAbsent = true).

Selecting any node updates the live Feature Details & Disk Cost card on the right and translates choices into exact ADDLOCAL, REMOVE, and ADVERTISE property lists passed to msi.dll.

Clean Live Progress Text (Zero Unexpanded [1] Placeholders)

instbuild.exe stores action descriptions (such as Copying new files) separately from ActionText.Template ([1]), and SetupWizard.exe formats every INSTALLMESSAGE_ACTIONDATA record through MsiFormatRecordW so users see real filenames instead of raw [1] placeholders.

Dual WYSIWYG Dialog Designers, Turnkey RsDialog Functions & Non-Clobbering PATH

Across Community, Developer, and Architect Editions, InstallerStudio.exe ships two interactive WYSIWYG visual dialog stages powered by our shared RaggieSoftVisualCanvas.hpp authoring engine:

  • View 8 — C++ SetupWizard.exe Page Designer ([Dialog.<Id>] & [Control.<Id>]): Splice custom configuration pages directly into SetupWizard.exe (AfterPage = SetupType | Welcome | License | CustomFeatures | CustomFolder | CustomShortcuts) with click-to-select, drag-to-move, 8-grip corner/edge resize, smart alignment guides, Arrow / Shift+Arrow keyboard-only nudging, live #Tab + Alt+Key mnemonic badges, and automatic SecureCustomProperties forwarding to Product.msi.
  • View 9 — 370×270 DLU MSI.DLL SQL Dialog Designer ([MsiDialog.<Id>] & [MsiControl.<Id>]): Visually place Text, Edit, PasswordEdit, PathEdit, CheckBox, RadioButtonGroup, ComboBox, ListBox, GroupBox, and Line controls onto genuine relational Windows Installer SQL tables—or click Export -> .rssc on either designer to copy ready-to-run RaggieScript wizard code!
  • Turnkey RsDialog Function Suite in RaggieScript (.rssc): Wire complete multi-step wizards in single-line calls—RsWelcome, RsLicense, RsReadme, RsUserInfo, RsSelectDestDir, RsSetupType, RsFeatureTree, RsAskOptions, RsAskText, RsReadyToInstall, RsFinish, and RsFinishReboot—with automatic DialogResult.Back (12) step-history rewinding!
  • Declarative Non-Clobbering [Environment.<Id>] & [IniFile.<Id>] Sections: Safely append or prepend directories to PATH (Action = append_path -> MSI [~];[INSTALLDIR] + segment-only uninstall removal) without ever truncating or clobbering existing user PATH variables, and stamp .ini settings cleanly across both Engine = msi and RaggieScript EXE (Engine = raggiescript).

Outer Setup.exe Execution Level (asInvoker, highestAvailable, requireAdministrator) & UAC-Off Admin Checks

Authors can explicitly choose which Windows execution level instbuild.exe stamps into the outer Setup.exe Win32 RT_MANIFEST (#1) via [Package] RequestedExecutionLevel (in both .rsip manifests and the InstallerStudio.exe Application Information view):

[Package]
Scope                   = machine
; Explicit Win32 RT_MANIFEST choice: asInvoker (default) | highestAvailable | requireAdministrator
RequestedExecutionLevel = asInvoker
  

1. asInvoker (Default — Just-in-Time Elevation When Clicking Install)

  • How it works: Outer Setup.exe starts with the caller's exact token, displays the Windows UAC shield on the Install button when Scope = machine, and elevates a single background --elevated-msi-worker broker only when the user clicks Install.
  • Advantages: Preserves the user's normal unelevated token when launching the app from the Finish screen (preventing Windows UIPI from blocking Explorer drag-and-drop and avoiding IT admin profile mix-ups on Over-the-Shoulder prompts), keeps mapped network drives (Y:\, Z:\) visible in Browse... pickers, and allows zero-prompt inspection or --help / --extract-msi runs.
  • Trade-offs: Prompts for UAC when clicking Install rather than at 0.0s launch.

2. highestAvailable (Elevate Up Front for Admins, Allow Standard Users to Open UI)

  • How it works: Stamps <requestedExecutionLevel level="highestAvailable" uiAccess="false"/> onto outer Setup.exe. Administrators receive the UAC prompt immediately at launch (0.0s), while Standard Users can still open the wizard without hard-blocking at launch (ideal for dual-scope installers that let non-admin users switch to per-user %LOCALAPPDATA% installation, or defer Over-the-Shoulder admin credentials until Install).

3. requireAdministrator (Immediate 0.0s Elevation Required at Launch)

  • How it works: Stamps <requestedExecutionLevel level="requireAdministrator" uiAccess="false"/> onto outer Setup.exe (displaying the blue-and-gold shield overlay on the .exe icon in File Explorer). Once approved at 0.0s, prerequisites and MsiInstallProductW execute directly in-process with zero mid-wizard interruptions.
  • Advantages: Ideal for "approve once up front & walk away" workflows, uninterrupted fullscreenblue / fullscreenteal 1995 retro washes, and custom wizard pages that inspect restricted HKLM or Windows Service state prior to installation.
  • Trade-offs: Standard users without admin credentials cannot open the wizard; mapped network drives are isolated from elevated tokens unless EnableLinkedConnections is enabled; and Finish-screen app launches require shell-token delegation (IShellDispatch2) on split-token Admin accounts so the launched app does not inherit elevated UIPI drag-and-drop restrictions.

4. Mandatory Administrator Rights Verification Even When UAC Is Disabled (EnableLUA = 0)

Relying solely on UAC's TokenElevation flag is unsafe on Windows workstations or servers where UAC has been turned off via Group Policy or Registry (HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System\EnableLUA = 0): when UAC is disabled, TokenIsElevated can report 0 even for real Administrators while requireAdministrator manifests and runas prompts no longer pop an elevation dialog for Standard Users!

SetupWizard.exe verifies actual NT security group membership via Win32 CheckTokenMembership(nullptr, BuiltinAdministratorsSid, &isAdmin) (DOMAIN_ALIAS_RID_ADMINS) alongside Product.msi Privileged LaunchCondition checks whenever Scope = machine (or RequestedExecutionLevel = requireAdministrator):

  • Administrator with UAC Off (EnableLUA = 0): CheckTokenMembership confirms active BUILTIN\Administrators membership and runs installation directly in-process without unnecessary runas loops.
  • Standard User with UAC Off (EnableLUA = 0): Because UAC is disabled and cannot prompt for elevation, SetupWizard.exe immediately blocks machine-wide installation with a clear, accessible "Administrator privileges are required to install this software for all users" dialog (and Product.msi enforces Privileged if invoked directly via msiexec.exe).

5. Per-Product Single-Instance Focus & Polite Cross-Product Global\_MSIExecute Auto-Queue

  • Same Product (UpgradeCode Match): Double-clicking an already-running product's Setup.exe (or Universal Web/Offline wrapper) never spawns a duplicate window. Instead, Instance #2 transfers foreground focus permission (AllowSetForegroundWindow) and sends a UIPI-whitelisted activation message so Instance #1 un-minimizes and comes straight to the front (returning 1618 only for headless /s / /qn scripts).
  • Different Product (UpgradeCode Differs): Two different installers (for example, StoreTrainer and Accessibility Studio) can open their interactive wizard pages side-by-side. If the user clicks Install while another MSI transaction holds Windows Installer's system-wide Global\_MSIExecute mutex, SetupWizard.exe switches its Windows Taskbar progress bar to amber (TBPF_PAUSED), announces which setup is currently finishing (via ScopedActiveMsiBeacon), keeps Cancel responsive, and automatically resumes installation the instant Global\_MSIExecute clears—eliminating MSI Error 1618.