InstallerUI
標準UIシーケンス
| xx | xxx |
|---|
| Mondo | WixUI_Mondo |
標準、カスタム、すべてのインストール形式を選択できる |
|
FeatureTree |
WixUI_FeatureTree |
常にカスタムインストール |
|
Minimal |
WixUI_Minimal |
使用許諾だけが出る、最も少ないUI. インストール先の変更もできない |
|
InstallDir |
WixUI_InstallDir |
Minimalにインストール先の変更を行えるようにした形のインストーラ |
Condition Message
起動条件
Ex.1
<!-- インストール環境を限定。64bitOS または、Windows2000 以降の最新SP環境 -->
<Condition Message="[ProductName]はこの版のWindowsでは導入できません">
<![CDATA[VersionNT64 >= 501 Or
VersionNT > 502 Or
(VersionNT = 502 And ServicePackLevel >= 1) Or
(VersionNT = 501 And ServicePackLevel >= 2) Or
(VersionNT = 500 And ServicePackLevel >= 4)]]>
</Condition>
Ex.2 Allow Win98
<Condition Message="[ProductName]はこの版のWindowsでは導入できません"> <![CDATA[Version9X >= 410 Or VersionNT > 400 ]]></Condition>
Version9X
|
Product
|
Version |
Version9X
Value |
|
Windows 95 |
4.0 |
400 |
|
Windows 98 |
4.10 |
410 |
|
Windows Me |
4.90 |
490 |
VersionNT
|
Product |
Version |
VersionNT value |
ServicePackLevel |
|
Windows NT4 |
4.0 |
400 |
|
|
Windows 2000 |
5.0 |
500 |
4 |
|
Windows XP |
5.1 |
501 |
2 |
|
Windows XP Professional x64 |
5.2 |
502 |
|
|
Windows 2003 |
5.2 |
502 |
2 |
|
Windows Vista |
6.0 |
600 |
1 |
|
Windows Server 2008 |
6.0 |
600 |
|
VersionNT64
|
Product |
Version |
VersionNT64 value |
ServicePackLevel |
|
Windows XP |
5.1 |
501 |
2 |
|
Windows XP Professional x64 |
5.2 |
502 |
|
|
Windows 2003 |
5.2 |
502 |
2 |
|
Windows Vista |
6.0 |
600 |
1 |
|
Windows Server 2008 |
6.0 |
600 |
|
ShortCut in start menu with Icon
<?xml version="1.0" encoding="UTF-8"?>
<!-- ShortCutAndIcon.wxs -->
<Wix xmlns="http://schemas.microsoft.com/wix/2003/01/wi">
<Product Id="C4C32574-3ED7-4142-B43B-63A72375D741" Name="ShortCutAndIcon" Version="1.00.0000" Manufacturer="smnb" Language="1041" Codepage="932">
<Package Id="????????-????-????-????-????????????" Description="SampleReadMe_txt" Comments="Database for ReadMe_txt" InstallerVersion="200" Platforms="Intel" Manufacturer="smnb" Keywords="Installer,MSI,Database" Languages="1041" SummaryCodepage="932" />
<Condition Message="[ProductName]はこの版のWindowsでは導入できません"><![CDATA[Version9X >= 410 Or VersionNT > 400 ]]></Condition>
<Media Id="1" Cabinet="Product.cab" EmbedCab="yes" />
<Directory Id="TARGETDIR" Name="SourceDir">
<Directory Id="ProgramFilesFolder">
<Directory Id="smnb" Name="smnb">
<Directory Id="INSTALLLOCATION" Name="_testMsi">
<Component Id="Component1" Guid="F99619B1-842E-4E05-B0CE-4106705D9075">
<File Id="File1" Name="Readme.txt" KeyPath="yes" Compressed="yes" DiskId="1" Source="resource\Readme.txt" />
<!-- short cut and icon -->
<Shortcut Id="Readme.txt" Directory="AppMenuFolder" Name="Readme" LongName="Testing Readme Sample" Description="This is a read me file" Icon="test.ico" IconIndex="0" Show="normal">
<Icon Id="test.ico" SourceFile="resource\test.ico" />
</Shortcut>
</Component>
</Directory>
</Directory>
</Directory>
<!-- Folder for ShortCut -->
<Directory Id="ProgramMenuFolder">
<Directory Id="AppMenuFolder" Name="Readme" LongName="Testing Readme Sample" />
</Directory>
</Directory>
<Feature Id="Feature1" Level="1">
<ComponentRef Id="Component1" />
</Feature>
<UIRef Id="WixUI_ErrorProgressText" />
<UIRef Id="WixUI_Minimal" />
</Product>
</Wix>
MergeModule
- 再利用できるセットアップ コンポーネント
- Windows インストーラ間でセットアップ コードを共有
- .msm ファイル は、コンポーネントをインストールするために必要なファイル、リソース、レジストリ エントリ、およびセットアップ方法をすべて格納する 1 つのパッケージ
- マージ モジュールは単独でインストールできず、Windows インストーラ ファイル (.msi) のコンテキストの中で使用することが必要
- マージ モジュールを使用すると、特定のコンポーネントの依存情報をすべて取り込むことができる
- 一度配布したマージ モジュールは修正しない
- コンポーネントのバージョンごとに新しいマージ モジュールを作成
・ソ<!-- ShortCutAndIcon.wxs -->
<Wix xmlns="http://schemas.microsoft.com/wix/2003/01/wi">
<Product Id="2006D50C-D31D-4CA2-B630-D77D5A90C5AE" Name="ShortCutAndIcon" Version="1.00.0000" Manufacturer="smnb" Language="1041" Codepage="932">
<Package Id="????????-????-????-????-????????????" Description="SampleReadMe_txt" Comments="Database for ReadMe_txt" InstallerVersion="200" Platforms="Intel" Manufacturer="smnb" Keywords="Installer,MSI,Database" Languages="1041" SummaryCodepage="932" />
<Condition Message="[ProductName] won't work with
this vrsion of Windows"><![CDATA[Version9X >= 410 Or VersionNT > 400 ]]></Condition>
<Media Id="1" Cabinet="Product.cab" EmbedCab="yes" />
<Directory Id="TARGETDIR" Name="SourceDir">
<Directory Id="ProgramFilesFolder">
<Directory Id="smnb" Name="smnb">
<Directory Id="INSTALLLOCATION" Name="_testMsi">
<Component Id="Component1" Guid="80557DFB-E034-4F29-A81F-8FAE7A6E97BF">
<File Id="File1" Name="testwix.exe" KeyPath="yes" Compressed="yes" DiskId="1" Source="resource\testwix.exe" />
<File Id="File2" Name="Readme.txt" KeyPath="no" Compressed="yes" DiskId="1" Source="resource\Readme.txt" />
<!-- short cut and icon -->
<Shortcut Id="File1" Directory="AppMenuFolder" Name="TestWix" LongName="Testing TestWix Sample" Description="This is a TestWix file" Icon="test.ico" IconIndex="0" Show="normal">
<Icon Id="test.ico" SourceFile="resource\test.ico" />
</Shortcut>
</Component>
</Directory>
</Directory>
</Directory>
<!-- Merge Modules -->
<Directory Id="SystemFolder" SourceName="System" LongSource="System32">
<Merge Id="VC80CRTx86.msm" Language="0" DiskId="1" SourceFile="$(env.CommonProgramFiles)\Merge Modules\Microsoft_VC80_CRT_x86.msm" />
<Merge Id="POLVC80CRTx86.msm" Language="0" DiskId="1" SourceFile="$(env.CommonProgramFiles)\Merge Modules\policy_8_0_Microsoft_VC80_CRT_x86.msm" />
</Directory>
<!-- Folder for ShortCut -->
<Directory Id="ProgramMenuFolder">
<Directory Id="AppMenuFolder" Name="Readme" LongName="Testing Readme Sample" />
</Directory>
</Directory>
<Feature Id="Feature1" Level="1">
<ComponentRef Id="Component1" />
<MergeRef Id="VC80CRTx86.msm"/> <MergeRef
Id="POLVC80CRTx86.msm"/> </Feature>
<UIRef Id="WixUI_ErrorProgressText" />
<UIRef Id="WixUI_Minimal" />
</Product>
</Wix>
Error Msg
LGHT0112 : Unresolved reference to symbol 'UI:WixUI_ErrorProgressText' in section
'Product:A4292E59-7036-41CA-A26D-BDAC8246365E'. LGHT0112 : Unresolved reference
to symbol 'UI:WixUI_Minimal' in section 'Product:A4292E59-7036-41CA-A26D-BDAC8246365E'.
===>
UIを持つライブラリを指定する必要があり
light WixUI_Minimal.wixobj -out WixUI_Minimal.msi c:\wix\wixui.wixlib -loc c:\w
ix\WixUI_en-us.wxl
light.exe : error LGHT0001 : 2 番目のパス フラグメントを ドライブ名または UNC 名
にすることはできません。
パラメータ名: path2
Exception Type: System.ArgumentException
Stack Trace:
場所 System.IO.Path.InternalCombine(String path1, String path2)
場所 System.IO.Directory.InternalGetFileDirectoryNames(String path, String us
erPathOriginal, String searchPattern, Boolean includeFiles, Boolean includeDirs,
SearchOption searchOption)
場所 System.IO.DirectoryInfo.GetFiles(String searchPattern, SearchOption sear
chOption)
場所 System.IO.DirectoryInfo.GetFiles(String searchPattern)
場所 Microsoft.Tools.WindowsInstallerXml.Common.GetFiles(String searchPath, S
tring fileType)
場所 Microsoft.Tools.WindowsInstallerXml.Tools.Light.ParseCommandLine(String[
] args)
場所 Microsoft.Tools.WindowsInstallerXml.Tools.Light.Run(String[] args)
make: *** [WixUI_Minimal.msi] Error 1