前回は、作成ツールを紹介しましたので、今回はSDKに搭載されているツールを紹介しておきます。
まずは、やっぱり ORCA。msi や msm などをごにょごにょしたり、msp を開発環境上で疑似的に適用させて違いを見たりと、およそ、WindowsInstaller に関係するもろもろの段取りすべてができます。
もちろん、根性入れて作業するつもりがあるなら、これ一つで msi を作ることも...昔はできたんですが、今はだめですね。不可能ですw
ま、実際に出来ないのはハッシュの取り出し程度なので、それを除けば作れるわけですが...普通はやりません。今更パンチカードでプログラミングの時代には戻りたくないでしょ?
?
続いては、通称 instmsi.exe と呼ばれる、WindowsInstaller のインストーラです。9x系であれば、InstMsiA.exe, NT4(2000のSP1まで)なら、InstMsiW.exe は必須コンポーネントとなります。
ちなみにこれら2つは、Windows Installer 2.0 までのものです。3.0 以降は、長ったらしい名前がついています。このあたりはサポートするOSのSPまで含めて慎重に選択する必要があるので注意する必要があります。
今更、2000 の SP3までとか NT4 だとか、9xだとかという対象を持ってるのは世界中でも数える程度でしょうから、昔は面倒だったのねで十分です。あ、もしまだやってるというようなところは、まだ1割もあるのか...のリンク先見せて、上を説得しましょう。権力に弱い上の人なら一発でおれますよw
?
まだまだ続きます。次は Msizap.exe。?何らかの理由でアンインストールできなくなってしまったという場合に、強制的にインストール情報「だけ」削除するツールです。CUI 版なので誰でも使えるというものではありませんが、開発中にカスタムアクションがバグっていたなどで、アンインストールできなくなっちゃったというときに便利です。
これの GUI 版にWindows Installer CleanUp ユーティリティというものがあります。こちらは、GUIツールなので、選んでバッサリ!ということができます。これらのツールのお世話になるというのは、Setup Auther としては屈辱なので、お世話になりたくないツールの一つです。
?
続いては msiinfo.exe。msi(msm)の SummaryInfomation ストリームを参照/編集するツールですが、普通は使いません。変わった使い方としては、2003までのオフィスドキュメントファイルなんかを渡してみると面白いかと。
コマンドラインツールですが、へぇ。。。というくらいには思えると。
?
気を取り直して続けましょう。次は Wilogutl.exe。msi のインストールログ解析ツールです。ただし、日本語環境では、Verbose ログ以外は解析できません。ログフォーマットが日本語化されてしまっているため、どうにもならないんですね。
まそれはさておき、インストール時にどうもおかしいという場合には、msiexec /i Hoge.msi /l*v Hoge.log としてログをとり、このツールで解析することで、さまざまな情報を表示することができます。
HTML にして表示などもできるので、開発中にはよくお世話になるツールの一つと言えます。
特に、デバッガを動かせないような環境での威力は絶大です。カスタムアクションが強制終了したような理由まではわかりませんが、その原因となりうる情報はおそらく吸い上げられるはずです。
前哨戦の最後は、Msival2.exe。msi のバリデータです。ICE(Internal Consistency Evaluators)?のチェックを行うコマンドラインツールとなります。
msi の正当性(ComponentId の重複とか、欠落とかいろいろ)を調査する際、非常に便利です。
Orca でも同じことができるので、こちらは、自動ビルドの最後に呼び出して自動的にエラーチェックするなどで使うためのものと言えます。
続きは、次のエントリーでw