Chapter 3 of 8 • Windows Installer Engine

Destination Folders, Components & KeyPath Rules

Windows Installer tracks every installed file, registry entry, and folder through atomic units called Components. RaggieSoft Installer Studio automates best-practice Component generation by default while giving advanced authors full declarative control via [Component.<Id>] and [Folder.<Id>].

Nine Standard Destination Roots

  • INSTALLDIR: Primary application directory under ProgramFiles64Folder (per-machine) or LocalAppDataFolder (per-user).
  • CommonFiles64Folder: Shared 64-bit components under C:\Program Files\Common Files.
  • CommonAppDataFolder: Machine-wide data under C:\ProgramData.
  • AppDataFolder & LocalAppDataFolder: Roaming and Local per-user profile directories (automatically enforced with ICE38 HKCU KeyPaths).
  • ApplicationProgramsFolder & DesktopFolder: Start Menu program group and Desktop shortcut folders.
  • System64Folder & FontsFolder: Native 64-bit System32 and Windows Fonts directories.

Enforced Windows Installer Component Rules

  1. Deterministic SHA-1 UUIDv5 Component GUIDs: When Guid = * (or when payloads auto-generate 1-file components), instbuild.exe derives a repeatable GUID from UpgradeCode + Architecture + TargetPath so major and minor upgrades never orphan resources.
  2. Single-Directory Rule (RSW031): Every payload bound to an explicit [Component.<Id>] must target the exact same TargetRoot and TargetSubdir.
  3. User-Profile HKCU KeyPath Rule (ICE38 / RSW032): Any component installing into a per-user folder (AppDataFolder, LocalAppDataFolder, StartMenu, or Desktop) must use a HKCU registry KeyPath rather than a file KeyPath.
  4. Empty Folder Creation & Cleanup (ICE18 & ICE64): Explicit [Folder.<Id>] sections emit both CreateFolder and RemoveFolder rows so uninstalls leave zero empty directories behind.
  5. Native 64-Bit Component Attributes (ICE80): On x64 and ARM64 packages, msidbComponentAttributes64bit (256) is set automatically across components and verified post-compile.

Declarative .rsip Example

[Component.CoreExe]
Feature       = Main
TargetRoot    = INSTALLDIR
Guid          = *
KeyPathKind   = file
KeyPathTarget = MyStudioApp.exe

[Folder.PluginCache]
TargetRoot    = LocalAppDataFolder
TargetSubdir  = RaggieSoft\MyStudioApp\Cache
Feature       = Main