Skip to content

Commit b345745

Browse files
committed
1 parent 993faae commit b345745

File tree

12 files changed

+138
-17
lines changed

12 files changed

+138
-17
lines changed

astro.config.mjs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -92,6 +92,7 @@ export default defineConfig({
9292
] },
9393

9494
{ label: 'Tools and concepts', collapsed: true, items: [
95+
'wix/tools/identifiers',
9596
'wix/tools/msbuild',
9697
'wix/tools/preprocessor',
9798
'wix/tools/payloads',
@@ -100,8 +101,7 @@ export default defineConfig({
100101
'wix/tools/dtf',
101102
'wix/tools/patches',
102103
'wix/tools/codepage',
103-
'wix/tools/wixexe',
104-
'wix/tools/heat'
104+
'wix/tools/wixexe'
105105
] },
106106

107107
{ label: 'WiX extensions and custom actions', collapsed: true, autogenerate: { directory: '/wix/tools/wixext' } },

src/content/docs/wix/index.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ revenue-generating use of the project’s releases requires participation in the
4343

4444
### Running packages built with WiX
4545

46-
In general, packages you build with WiX will work on Windows 7 or later. Code that you introduce -- for example, custom actions or bootstrapper applications -- can require later versions of Windows.
46+
In general, packages you build with WiX work on Windows 7 and later. Code you write--for example, custom actions or bootstrapper applications--can require later versions of Windows. In general, the WiX team prioritizes issues related to _supported_ versions of Windows. Once a version of Windows is no longer supported by Microsoft, public interest in those versions is limited.
4747

4848
### Building packages with WiX
4949

src/content/docs/wix/tools/burn/builtin-variables.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,8 @@ The Burn engine offers a set of commonly-used variables so you can use them with
6060
| WindowsFolder | The well-known folder for CSIDL_WINDOWS. |
6161
| WindowsVolume | The well-known folder for the windows volume. |
6262
| WixBundleAction | Numeric value of BOOTSTRAPPER_ACTION from the command-line and updated during the call to IBootstrapperEngine::Plan. |
63+
| WixBundleAuthoredScope | Reports the bundle's scope at build time: 1=Per-machine, 2=Per-machine or per-user, 3=Per-user or per-machine, 4=Per-user |
64+
| WixBundleDetectedScope | Reports the scope of the bundle when it was originally installed: 1=Per-machine, 2=Per-user |
6365
| WixBundleDirectoryLayout | The folder provided to the `-layout` switch (default is the directory containing the bundle executable). This variable can also be set by the bootstrapper application to modify where files will be laid out. |
6466
| WixBundleElevated | Non-zero if the bundle was launched elevated and set to `1` once the bundle is elevated. For example, use this variable to show or hide the elevation shield in the bootstrapper application UI. |
6567
| WixBundleExecutePackageCacheFolder | The absolute path to the currently executing package's cache folder. This variable is only available while a package is executing. |
@@ -70,6 +72,7 @@ The Burn engine offers a set of commonly-used variables so you can use them with
7072
| WixBundleManufacturer | The manufacturer of the bundle (from `Bundle/@Manufacturer`). |
7173
| WixBundleOriginalSource | The source path where the bundle originally ran. |
7274
| WixBundleOriginalSourceFolder | The folder where the bundle originally ran. |
75+
| WixBundlePlannedScope | Reports the scope of the bundle when the BA began the planning phase: 1=Per-machine, 2=Per-user |
7376
| WixBundleSourceProcessPath | The source path of the bundle where originally executed. Will only be set when bundle is executing in the clean room. (Removed in WiX v5) |
7477
| WixBundleSourceProcessFolder | The source folder of the bundle where originally executed. Will only be set when bundle is executing in the clean room. (Removed in WiX v5) |
7578
| WixBundleProviderKey | The bundle dependency provider key. |
Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
---
2+
title: Identifiers
3+
---
4+
5+
Identifiers in WiX follow familiar rules for allowed characters:
6+
7+
- All characters must be in the ASCII range.
8+
- The first character must be a letter (`A-Z` or `a-z`) or an underscore (`_`).
9+
- The remaining characters must be a letter (`A-Z` or `a-z`), an underscore (`_`), a period (`.`), or a digit (`0-9`).
10+
11+
These rules match Windows Installer's own rules. [MSI has additional rules and conventions.](https://learn.microsoft.com/en-us/windows/win32/msi/about-properties)
12+
13+
14+
## Access modifiers
15+
16+
WiX supports specifying scope to identifiers, much like access modifiers in languages like C#:
17+
18+
- `global`: Indicates the identifier is globally visible to all other sections.
19+
- `library`: Indicates the identifier is visible only to sections in the same library.
20+
- `file`: Indicates the identifier is visible only to sections in the same source file.
21+
- `section`: Indicates the identifier is visible only to the section where it is defined.
22+
- `virtual`: Indicates the identifier can be overridden by another symbol. Virtual identifiers are always `global`.
23+
- `override`: Indicates the identifier overrides a virtual symbol. Overridden virtual identifiers are always `global`.
24+
25+
Identifiers are `global` by default. Global identifiers are recorded in the output (package or bundle, for example) literally. Library, file, and section identifiers are given stable, calculated identifiers in the output so they cannot be referred to except as allowed by the access modifier. For example, an identifier of `section Foo` cannot be referred to except within the section (fragment, for example); if an identifier is required by the output (such as a file id in an MSI package), WiX supplies a stable, calculated identifier instead of `Foo`. That lets you keep `Foo` "private."
26+
27+
### Virtual and overridden identifiers
28+
29+
It's frequently useful to provide a default aspect to an identifier but allow the developer to override that default. The canonical example is to schedule a custom action at a particular point in `InstallExecuteSequence` but to allow a developer to override the default scheduling. (Note that such overrides aren't always a good idea; consider carefully why the default is what it is.)
30+
31+
For example, WiX extensions define custom action scheduling with the `virtual` access modifier:
32+
33+
```xml
34+
<InstallExecuteSequence>
35+
<Custom
36+
Action="virtual $(var.Prefix)CloseApplications$(var.Suffix)"
37+
Before="InstallFiles"
38+
Condition="VersionNT &gt; 400" />
39+
</InstallExecuteSequence>
40+
```
41+
42+
To reschedule it, use the `override` access modifier to override the scheduling provided by the `virtual` symbol:
43+
44+
```xml
45+
<InstallExecuteSequence>
46+
<Custom
47+
Action="override Wix4CloseApplications_$(sys.BUILDARCHSHORT)"
48+
After="InstallInitialize" />
49+
</InstallExecuteSequence>
50+
```

src/content/docs/wix/tools/msbuild.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
title: MSBuild
33
---
44

5-
WiX v4 is available as an MSBuild SDK. SDK-style projects have smart defaults that make for simple .wixproj project authoring. For example, here's a minimal .wixproj that builds an MSI from the .wxs source files in the project directory:
5+
WiX is available as an MSBuild SDK. SDK-style projects have smart defaults that make for simple .wixproj project authoring. For example, here's a minimal .wixproj that builds an MSI from the .wxs source files in the project directory:
66

77
```xml
88
<Project Sdk="WixToolset.Sdk/6.0.2">
@@ -116,7 +116,7 @@ variables will not be available when using the command-line to build a project f
116116
Sometimes you need to add or modify several of the same properties in multiple MSBuild projects, like manufacturer name, copyright, product name, and so forth. Instead of editing every single project, you can manage properties from a central location in a file named Directory.Build.props.
117117

118118
:::info
119-
Directory.Build.props is a feature of Microsoft.Common.props, which the WiX v4 MSBuild targets consume. The same is also true of Directory.Build.targets and Microsoft.Common.targets. [You can read more about this support here.](https://learn.microsoft.com/en-us/visualstudio/msbuild/customize-by-directory)
119+
Directory.Build.props is a feature of Microsoft.Common.props, which the WiX MSBuild targets consume. The same is also true of Directory.Build.targets and Microsoft.Common.targets. [You can read more about this support here.](https://learn.microsoft.com/en-us/visualstudio/msbuild/customize-by-directory)
120120
:::
121121

122122
To use Directory.Build.props, add it to the root of your project -- MSBuild will find the file in parent directories -- and give it a property group. For example:

src/content/docs/wix/tools/preprocessor.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ $(MyVariable)
9797
```
9898

9999
:::tip
100-
In WiX v3, user-defined variables were referenced with the syntax `$(var.MyVariable)`. WiX v4 uses `$(MyVariable)` instead and supports `$(var.MyVariable)` for backward compatibility.
100+
WiX uses `$(MyVariable)` instead and supports `$(var.MyVariable)` for compatibility with WiX v3.
101101
:::
102102

103103

src/content/docs/wix/tools/wixexe.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -355,7 +355,7 @@ _sourceFile_ can include wildcards like `*.wxs`.
355355
| `Win64AttributeRenamed` | The Win64 attribute has been renamed. Use the Bitness attribute instead. |
356356
| `Win64AttributeRenameCannotBeAutomatic` | Breaking change: The Win64 attribute's value '{0}' cannot be converted automatically to the new Bitness attribute. |
357357
| `TagElementRenamed` | The Tag element has been renamed. Use the element 'SoftwareTag' name. |
358-
| `IntegratedDependencyNamespace` | The Dependency namespace has been incorporated into WiX v4 namespace. |
358+
| `IntegratedDependencyNamespace` | The Dependency namespace has been incorporated into WiX namespace. |
359359
| `RemoveUnusedNamespaces` | Remove unused namespaces. |
360360
| `RemotePayloadRenamed` | The Remote element has been renamed. Use the "XxxPackagePayload" element instead. |
361361
| `NameAttributeMovedToRemotePayload` | The XxxPackage/@Name attribute must be specified on the child XxxPackagePayload element when using a remote payload. |
@@ -375,7 +375,7 @@ _sourceFile_ can include wildcards like `*.wxs`.
375375
| `MsuPackageKBObsolete` | The MsuPackage element contains obsolete '{0}' attribute. Windows no longer supports silently removing MSUs so the attribute is unnecessary. The attribute will be removed. |
376376
| `MsuPackagePermanentObsolete` | The MsuPackage element contains obsolete '{0}' attribute. MSU packages are now always permanent because Windows no longer supports silently removing MSUs. The attribute will be removed. |
377377
| `MoveNamespacesToRoot` | Namespace should be defined on the root. The '{0}' namespace was move to the root element. |
378-
| `CustomActionIdsIncludePlatformSuffix` | Custom action ids have changed in WiX v4 extensions. Because WiX v4 has platform-specific custom actions, the platform is applied as a suffix: _X86, _X64, _A64 (Arm64). When manually rescheduling custom actions, you must use the new custom action id, with platform suffix. |
378+
| `CustomActionIdsIncludePlatformSuffix` | Custom action ids have changed in WiX v4 extensions. Because WiX now has platform-specific custom actions, the platform is applied as a suffix: _X86, _X64, _A64 (Arm64). When manually rescheduling custom actions, you must use the new custom action id, with platform suffix. |
379379
| `StandardDirectoryRefDeprecated` | The {0} directory should no longer be explicitly referenced. Remove the DirectoryRef element with Id attribute '{0}'. |
380380
| `EmptyStandardDirectoryRefNotConvertable` | Referencing '{0}' directory directly is no longer supported. The DirectoryRef will not be removed but you will probably need to reference a more specific directory. |
381381
| `WixMbaPrereqLicenseUrlDeprecated` | The magic WixVariable 'WixMbaPrereqLicenseUrl' has been removed. Add bal:PrereqLicenseUrl="_url_" to a prereq package instead. |

src/content/docs/wix/tools/wixext/quietexec.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,7 @@ WixSilentExec supports silent and deferred execution like WixQuietExec.
113113

114114
## 64-bit awareness
115115

116-
WixQuietExec64 and WixSilentExec64 are variants of WixQuietExec and WixSilentExec that are 32-bit custom actions (regardless of name) that are 64-bit aware. Specifically, they know how to turn off file-system redirections (for example) to support running 64-bit processes. WiX v4 has native custom actions for all three supported platforms (x86, x64, and Arm64), so if you need to call a 64-bit process from a 32-bit package, use those by hard-coding the `BinaryRef`. For example:
116+
WixQuietExec64 and WixSilentExec64 are variants of WixQuietExec and WixSilentExec that are 32-bit custom actions (regardless of name) that are 64-bit aware. Specifically, they know how to turn off file-system redirections (for example) to support running 64-bit processes. WiX has native custom actions for all three supported platforms (x86, x64, and Arm64), so if you need to call a 64-bit process from a 32-bit package, use those by hard-coding the `BinaryRef`. For example:
117117

118118
```xml
119119
<CustomAction

src/content/docs/wix/whatsnew/configurable_scope_bundles.md

Lines changed: 57 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,62 @@ sidebar:
55
---
66

77
:::tip
8-
Content to come:
8+
Configurable scope bundles are available in WiX v7 and later.
9+
:::
10+
11+
Burn supports ["dual-purpose" packages](https://learn.microsoft.com/en-us/windows/win32/msi/single-package-authoring) that can be installed either per-user or per-machine. Bundles that contain a dual-purpose package are considered configurable-scope bundles. When such bundles are installed, their bootstrapper application tells Burn how to install the dual-purpose packages:
12+
13+
- Default: Install dual-purpose packages based on their authoring. `Package/@Scope="perUserOrMachine` packages are installed per-user by default. `Package/@Scope="perMachineOrUser` packages are installed per-machine by default.
14+
- PerUser: Dual-purpose packages are installed per-user.
15+
- PerMachine: Dual-purpose packages are installed per-machine.
916

10-
- https://github.com/wixtoolset/issues/issues/9235
11-
- https://github.com/wixtoolset/issues/issues/9237
12-
- https://github.com/wixtoolset/issues/issues/9238
17+
:::tip
18+
Single-purpose per-user or per-machine packages do not change their scope based on the BA's choice. They're fixed in scope at build time.
1319
:::
20+
21+
22+
## Supporting configurable-scope bundles with custom bootstrapper applications
23+
24+
Custom bootstrapper applications can offer UI or business logic to determine the scope a bundle will be installed with. Once the scope decision has been made, the BA provides it to Burn during planning. To do so, pass the scope argument to the `Plan` function.
25+
26+
In a managed-code BA, pass one of `BundleScope.Default`, `BundleScope.PerUser`, or `BundleScope.PerMachine` to `Plan`.
27+
28+
In a native-code BA, pass one of `BOOTSTRAPPER_SCOPE_DEFAULT`, `BOOTSTRAPPER_SCOPE_PER_USER`, or `BOOTSTRAPPER_SCOPE_PER_MACHINE` to `Plan`.
29+
30+
31+
## Supporting configurable-scope bundles with WixStandardBootstrapperApplication
32+
33+
WixStdBA supports configurable-scope bundles and all the stock WixStdBA themes include scope-selection radio buttons on the Options page. WixStdBA relies on the bundle variable `WixStdBAScope` to be set either to `PerUser` for per-user scope or `PerMachine` for per-machine scope. The stock WixStdBA themes accomplish this with radio buttons like this:
34+
35+
```xml
36+
<RadioButtons Name="WixStdBAScope">
37+
<RadioButton X="11" Y="180" Height="20" Width="-11" Value="PerUser" EnableCondition="WixBundleAuthoredScope = 2 OR WixBundleAuthoredScope = 3" HideWhenDisabled="yes" FontId="3">#(loc.OptionsPerUserScopeText)</RadioButton>
38+
<RadioButton X="11" Y="200" Height="20" Width="-11" Value="PerMachine" EnableCondition="WixBundleAuthoredScope = 2 OR WixBundleAuthoredScope = 3" HideWhenDisabled="yes" FontId="3">#(loc.OptionsPerMachineScopeText)</RadioButton>
39+
</RadioButtons>
40+
```
41+
42+
The `EnableCondition="WixBundleAuthoredScope = 2 OR WixBundleAuthoredScope = 3"` attribute value enables the scope-selection radio buttons only when a configurable-scope bundle is being executed.
43+
44+
You can have an entirely custom theme using any UI you prefer: Just have it set `WixStdBAScope` to either `PerUser` for per-user scope or `PerMachine` for per-machine scope. You can also set `WixStdBAScope` to a static value in your `Bundle` authoring if you want to force a particular scope for any dual-purpose packages.
45+
46+
47+
## Configurable-scope bundle variables
48+
49+
Burn adds some variables that you can use in WixStdBA custom themes or in your own BAs to detect that a bundle has configurable scope.
50+
51+
- WixBundleAuthoredScope: Reports the bundle's scope at build time:
52+
- 1: Per-machine
53+
- 2: Per-machine or per-user
54+
- 3: Per-user or per-machine
55+
- 4: Per-user
56+
- WixBundleDetectedScope: Reports the scope of the bundle when it was originally installed:
57+
- 1: Per-machine
58+
- 2: Per-user
59+
- WixBundlePlannedScope: Reports the scope of the bundle when the BA began the planning phase:
60+
- 1: Per-machine
61+
- 2: Per-user
62+
63+
64+
## Configurable-scope bundles as `BundlePackage`s
65+
66+
Bundles can include configurable-scope bundles in their chains. When the consuming bundle is built, XXX

src/content/docs/wix/whatsnew/index.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,11 @@ sidebar:
44
order: 2
55
---
66

7+
## What's new in WiX v7
8+
9+
WiX v7.0.0-rc.2 is available. See [the release notes](/wix/whatsnew/releasenotes/#wix-v7) for details about this prerelease.
10+
11+
712
## What's new in WiX v6
813

914
WiX v6 continues to be highly compatible in its language syntax with WiX v5 and even v4. We're liking how easy it is to pick up new versions of WiX without worrying about code conversion.

0 commit comments

Comments
 (0)