Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix code snippets in markdown #225

Merged
merged 1 commit into from
Sep 7, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -16,41 +16,41 @@ The WiX schema supports the following chained package types:

Here is an example of authoring an ExePackage in a sharable fragment:

```
<?xml version="1.0"?>
<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi">
<Fragment>
<PackageGroup Id="MyPackage">
<ExePackage
SourceFile="[sources]\packages\shared\MyPackage.exe"
DetectCondition="ExeDetectedVariable"
DownloadUrl="http://example.com/?mypackage.exe"
InstallCommand="/q /ACTION=Install"
RepairCommand="/q ACTION=Repair /hideconsole"
UninstallCommand="/q ACTION=Uninstall /hideconsole" />
</PackageGroup>
</Fragment>
</Wix>
```xml
<?xml version="1.0"?>
<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi">
<Fragment>
<PackageGroup Id="MyPackage">
<ExePackage
SourceFile="[sources]\packages\shared\MyPackage.exe"
DetectCondition="ExeDetectedVariable"
DownloadUrl="http://example.com/?mypackage.exe"
InstallCommand="/q /ACTION=Install"
RepairCommand="/q ACTION=Repair /hideconsole"
UninstallCommand="/q ACTION=Uninstall /hideconsole" />
</PackageGroup>
</Fragment>
</Wix>
```

Now you can add an install condition to the package so that it only installs on x86 Windows XP and above. There are [built-in variables](bundle_built_in_variables.md) that can be used to construct these condition statements. The highlighted section shows how to leverage the built-in variables to create that condition:

```
&lt;?xml version=&quot;1.0&quot;?&gt;
&lt;Wix xmlns=&quot;http://schemas.microsoft.com/wix/2006/wi&quot;&gt;
&lt;Fragment&gt;
&lt;PackageGroup Id=&quot;MyPackage&quot;&gt;
&lt;ExePackage
SourceFile=&quot;[sources]\packages\shared\MyPackage.exe&quot;
DetectCondition=&quot;ExeDetectedVariable&quot;
DownloadUrl=&quot;http://example.com/?mypackage.exe&quot;
InstallCommand=&quot;/q /ACTION=Install&quot;
RepairCommand=&quot;/q ACTION=Repair /hideconsole&quot;
UninstallCommand=&quot;/q ACTION=Uninstall /hideconsole&quot;
<strong class="highlight">InstallCondition=&quot;NOT VersionNT64 AND VersionNT &gt;= v5.1&quot;</strong> /&gt;
&lt;/PackageGroup&gt;
&lt;/Fragment&gt;
&lt;/Wix&gt;
```xml
<?xml version="1.0"?>
<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi">
<Fragment>
<PackageGroup Id="MyPackage">
<ExePackage
SourceFile="[sources]\packages\shared\MyPackage.exe"
DetectCondition="ExeDetectedVariable"
DownloadUrl="http://example.com/?mypackage.exe"
InstallCommand="/q /ACTION=Install"
RepairCommand="/q ACTION=Repair /hideconsole"
UninstallCommand="/q ACTION=Uninstall /hideconsole"
<strong class="highlight">InstallCondition="NOT VersionNT64 AND VersionNT >= v5.1"</strong> />
</PackageGroup>
</Fragment>
</Wix>
```

The VersionNT property takes up to a four-part version number ([Major].[Minor].[Build].[Revision]). For a list of major and minor versions of the Windows operating system, see <a href="http://msdn.microsoft.com/library/ms724832.aspx" target="_blank">Operating System Version</a>.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,55 +14,55 @@ Searches are used to detect if the target machine meets certain conditions. The
* [ProductSearch](../xsd/util/productsearch.md)

A search can be dependent on the result of another search. Keep in mind that all searches are in the WiXUtilExtension. So remember to add the WiXUtilExtension namespace in the authoring. Here is an example:

<?xml version="1.0"?>
<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi"
xmlns:util="http://schemas.microsoft.com/wix/UtilExtension">
<Fragment>
<util:RegistrySearch Id="Path"
Variable="UniqueId"
Root="HKLM"
Key="Software\MyCompany\MyProduct\Unique Id\Product"
Result="Value" />
<util:RegistrySearch
Variable="patchLevel"
Root="HKLM"
Key="Software\MyCompany\MyProduct\[UniqueId]\Setup\PatchLevel"
Result="Exists"
After="Path" />
</Fragment>
</Wix>

```xml
<?xml version="1.0"?>
<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi"
xmlns:util="http://schemas.microsoft.com/wix/UtilExtension">
<Fragment>
<util:RegistrySearch Id="Path"
Variable="UniqueId"
Root="HKLM"
Key="Software\MyCompany\MyProduct\Unique Id\Product"
Result="Value" />
<util:RegistrySearch
Variable="patchLevel"
Root="HKLM"
Key="Software\MyCompany\MyProduct\[UniqueId]\Setup\PatchLevel"
Result="Exists"
After="Path" />
</Fragment>
</Wix>
```
After the searches are defined and stored into variables, the variables can then be used in install conditions. For example, you can use the result of the registry searches in the install condition of your package by adding both the searches and the install conditions. Here&apos;s an example of a complete fragment that contains a package definition with conditions and searches:

```
&lt;?xml version=&quot;1.0&quot;?&gt;
&lt;Wix xmlns=&quot;http://schemas.microsoft.com/wix/2006/wi&quot;
xmlns:util=&quot;http://schemas.microsoft.com/wix/UtilExtension&quot;&gt;
&lt;Fragment&gt;
&lt;util:RegistrySearch Id=&quot;Path&quot;
Variable=&quot;UniqueId&quot;
Root=&quot;HKLM&quot;
Key=&quot;Software\MyCompany\MyProduct\Unique Id\Product&quot;
Result=&quot;Value&quot; /&gt;
&lt;util:RegistrySearch
Variable=&quot;patchLevel&quot;
Root=&quot;HKLM&quot;
Key=&quot;Software\MyCompany\MyProduct\[UniqueId]\Setup\PatchLevel&quot;
Result=&quot;Exists&quot;
After=&quot;Path&quot; /&gt;
<?xml version="1.0"?>
<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi"
xmlns:util="http://schemas.microsoft.com/wix/UtilExtension">
<Fragment>
<util:RegistrySearch Id="Path"
Variable="UniqueId"
Root="HKLM"
Key="Software\MyCompany\MyProduct\Unique Id\Product"
Result="Value" />
<util:RegistrySearch
Variable="patchLevel"
Root="HKLM"
Key="Software\MyCompany\MyProduct\[UniqueId]\Setup\PatchLevel"
Result="Exists"
After="Path" />

&lt;PackageGroup Id=&quot;MyPackage&quot;&gt;
&lt;ExePackage
SourceFile=&quot;[sources]\packages\shared\MyPackage.exe&quot;
DownloadURL=&quot;http://mywebdomain.com/?mypackage.exe&quot;
InstallCommand=&quot;/q /ACTION=Install&quot;
RepairCommand=&quot;/q ACTION=Repair /hideconsole&quot;
UninstallCommand=&quot;/q ACTION=Uninstall /hideconsole&quot;
InstallCondition=&quot;x86 = 1 AND OSVersion &gt;= v5.0.5121.0 <strong class="highlight">AND patchLevel = 0</strong>&quot; /&gt;
&lt;/PackageGroup&gt;
&lt;/Fragment&gt;
&lt;/Wix&gt;
<PackageGroup Id="MyPackage">
<ExePackage
SourceFile="[sources]\packages\shared\MyPackage.exe"
DownloadURL="http://mywebdomain.com/?mypackage.exe"
InstallCommand="/q /ACTION=Install"
RepairCommand="/q ACTION=Repair /hideconsole"
UninstallCommand="/q ACTION=Uninstall /hideconsole"
InstallCondition="x86 = 1 AND OSVersion >= v5.0.5121.0 <strong class="highlight">AND patchLevel = 0</strong>" />
</PackageGroup>
</Fragment>
</Wix>
```

Now you have a fully-defined fragment that can be shared to be consumed by other Burn packages. To see how to chain this package into a Burn package, see [Chain Packages into a Bundle](bundle_author_chain.md).
Original file line number Diff line number Diff line change
Expand Up @@ -5,44 +5,44 @@ after: wixstdba_license
---
# Changing the WiX Standard Bootstrapper Application Branding

The WiX Standard Bootstrapper Application displays a generic logo in the bottom left corner of the user interface. It is possible to change the image displayed using the WixStandardBootstrapperApplication element provided by WixBalExtension. The following example uses a &quot;customlogo.png&quot; file found in the &quot;path\to&quot; folder relative to the linker bind paths.
The WiX Standard Bootstrapper Application displays a generic logo in the bottom left corner of the user interface. It is possible to change the image displayed using the WixStandardBootstrapperApplication element provided by WixBalExtension. The following example uses a "customlogo.png" file found in the "path\to" folder relative to the linker bind paths.

```
&lt;?xml version=&quot;1.0&quot;?&gt;
&lt;Wix xmlns=&quot;http://schemas.microsoft.com/wix/2006/wi&quot;
xmlns:bal=&quot;http://schemas.microsoft.com/wix/BalExtension&quot;&gt;
&lt;Bundle&gt;
&lt;BootstrapperApplicationRef Id=&quot;WixStandardBootstrapperApplication.RtfLicense&quot;&gt;
&lt;bal:WixStandardBootstrapperApplication
LicenseFile=&quot;path\to\license.rtf&quot;
<strong class="highlight">LogoFile=&quot;path\to\customlogo.png&quot;</strong>
/&gt;
&lt;/BootstrapperApplicationRef&gt;
```xml
<?xml version="1.0"?>
<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi"
xmlns:bal="http://schemas.microsoft.com/wix/BalExtension">
<Bundle>
<BootstrapperApplicationRef Id="WixStandardBootstrapperApplication.RtfLicense">
<bal:WixStandardBootstrapperApplication
LicenseFile="path\to\license.rtf"
<strong class="highlight">LogoFile="path\to\customlogo.png"</strong>
/>
</BootstrapperApplicationRef>

&lt;Chain&gt;
...
&lt;/Chain&gt;
&lt;/Bundle&gt;
&lt;/Wix&gt;
<Chain>
...
</Chain>
</Bundle>
</Wix>
```

For the HyperlinkSidebarLicense UI, there are two logos and they can be configured as follows:

```
&lt;?xml version=&quot;1.0&quot;?&gt;
&lt;Wix xmlns=&quot;http://schemas.microsoft.com/wix/2006/wi&quot;
xmlns:bal=&quot;http://schemas.microsoft.com/wix/BalExtension&quot;&gt;
&lt;Bundle&gt;
&lt;BootstrapperApplicationRef Id=&quot;WixStandardBootstrapperApplication.HyperlinkSidebarLicense&quot;&gt;
&lt;bal:WixStandardBootstrapperApplication
LicenseUrl=&quot;License.htm&quot;
<strong class="highlight">LogoFile=&quot;path\to\customlogo.png&quot; LogoSideFile=&quot;path\to\customsidelogo.png&quot;</strong>
/&gt;
&lt;/BootstrapperApplicationRef&gt;
```xml
<?xml version="1.0"?>
<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi"
xmlns:bal="http://schemas.microsoft.com/wix/BalExtension">
<Bundle>
<BootstrapperApplicationRef Id="WixStandardBootstrapperApplication.HyperlinkSidebarLicense">
<bal:WixStandardBootstrapperApplication
LicenseUrl="License.htm"
<strong class="highlight">LogoFile="path\to\customlogo.png" LogoSideFile="path\to\customsidelogo.png"</strong>
/>
</BootstrapperApplicationRef>

&lt;Chain&gt;
...
&lt;/Chain&gt;
&lt;/Bundle&gt;
&lt;/Wix&gt;
<Chain>
...
</Chain>
</Bundle>
</Wix>
```
Original file line number Diff line number Diff line change
Expand Up @@ -7,46 +7,46 @@ layout: documentation

The WiX Standard Bootstrapper Application (WixStdBA) supports displaying a license in RTF format and/or linking to a license file that either exists locally or on the web. The license file is specified in the <bal:WixStandardBootstrapperApplication> element using the LicenseFile or LicenseUrl attribute, depending on which WixStdBA theme is used.

When using a WixStdBA theme that displays the RTF license, it is highly recommended that the license is overridden because the default uses &quot;Lorem ipsum&quot; placeholder text. The following example uses a license.rtf file found in the &quot;path\to&quot; folder relative to the linker bind paths.

```
&lt;?xml version=&quot;1.0&quot;?&gt;
&lt;Wix xmlns=&quot;http://schemas.microsoft.com/wix/2006/wi&quot; xmlns:bal=&quot;http://schemas.microsoft.com/wix/BalExtension&quot;&gt;
&lt;Bundle&gt;
&lt;BootstrapperApplicationRef Id=&quot;WixStandardBootstrapperApplication.RtfLicense&quot;&gt;
&lt;bal:WixStandardBootstrapperApplication
<strong class="highlight">LicenseFile=&quot;path\to\license.rtf&quot;</strong>
LogoFile=&quot;path\to\customlogo.png&quot;
/&gt;
&lt;/BootstrapperApplicationRef&gt;

&lt;Chain&gt;
...
&lt;/Chain&gt;
&lt;/Bundle&gt;
&lt;/Wix&gt;
When using a WixStdBA theme that displays the RTF license, it is highly recommended that the license is overridden because the default uses "Lorem ipsum" placeholder text. The following example uses a license.rtf file found in the "path\to" folder relative to the linker bind paths.

```xml
<?xml version="1.0"?>
<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi" xmlns:bal="http://schemas.microsoft.com/wix/BalExtension">
<Bundle>
<BootstrapperApplicationRef Id="WixStandardBootstrapperApplication.RtfLicense">
<bal:WixStandardBootstrapperApplication
<strong class="highlight">LicenseFile="path\to\license.rtf"</strong>
LogoFile="path\to\customlogo.png"
/>
</BootstrapperApplicationRef>

<Chain>
...
</Chain>
</Bundle>
</Wix>
```

The following example links to a license page on the internet.

```
&lt;?xml version=&quot;1.0&quot;?&gt;
&lt;Wix xmlns=&quot;http://schemas.microsoft.com/wix/2006/wi&quot; xmlns:bal=&quot;http://schemas.microsoft.com/wix/BalExtension&quot;&gt;
&lt;Bundle&gt;
&lt;BootstrapperApplicationRef Id=&quot;WixStandardBootstrapperApplication.HyperlinkLicense&quot;&gt;
&lt;bal:WixStandardBootstrapperApplication
<strong class="highlight">LicenseUrl=&quot;http://example.com/license.html&quot;</strong>
LogoFile=&quot;path\to\customlogo.png&quot;
/&gt;
&lt;/BootstrapperApplicationRef&gt;

&lt;Chain&gt;
...
&lt;/Chain&gt;
&lt;/Bundle&gt;
&lt;/Wix&gt;
```xml
<?xml version="1.0"?>
<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi" xmlns:bal="http://schemas.microsoft.com/wix/BalExtension">
<Bundle>
<BootstrapperApplicationRef Id="WixStandardBootstrapperApplication.HyperlinkLicense">
<bal:WixStandardBootstrapperApplication
<strong class="highlight">LicenseUrl="http://example.com/license.html"</strong>
LogoFile="path\to\customlogo.png"
/>
</BootstrapperApplicationRef>

<Chain>
...
</Chain>
</Bundle>
</Wix>
```

When using a WixStdBA theme that displays the license as a hyperlink, the license is optional. Provide an empty string for WixStandardBootstrapperApplication/@LicenseUrl---the hyperlink and accept license checkbox are not displayed, providing an &quot;unlicensed&quot; installation experience.
When using a WixStdBA theme that displays the license as a hyperlink, the license is optional. Provide an empty string for WixStandardBootstrapperApplication/@LicenseUrl---the hyperlink and accept license checkbox are not displayed, providing an "unlicensed" installation experience.

If you get an error indicating `The Windows Installer XML variable !(wix.WixStdbaLicenseUrl) is unknown`, provide a value for WixStandardBootstrapperApplication/@LicenseUrl, even if it's an empty string.
If you get an error indicating `The Windows Installer XML variable !(wix.WixStdbaLicenseUrl) is unknown`, provide a value for WixStandardBootstrapperApplication/@LicenseUrl, even if it's an empty string.
Loading