ユーザ用ツール

サイト用ツール


it技術:dotnet:インストーラーの作成

差分

このページの2つのバージョン間の差分を表示します。

この比較画面へのリンク

両方とも前のリビジョン前のリビジョン
次のリビジョン
前のリビジョン
it技術:dotnet:インストーラーの作成 [2020/07/28 13:36] – [プロパティの設定] yajuadminit技術:dotnet:インストーラーの作成 [2020/10/26 10:45] (現在) – [サービスのインストール] yajuadmin
行 157: 行 157:
 例 /TargetDir="[TARGETDIR]\" 例 /TargetDir="[TARGETDIR]\"
  
 +==== Error 1001 ====
 +=== インストール ===
 +インストール時に「Error 1001」によりインストールできない。\\
 +原因としてCustomActionDataプロパティに「/TargetDir="[TARGETDIR]"」と末尾の"\"を除外したため。※二重引用符を外して末尾の"\"を除外した場合はエラーにならない。\\
 +  * [[https://stackoverflow.com/questions/1682532/msi-error-1001-usage-installutil-error-on-production-server|MSI Error. 1001. Usage: InstallUtil .. error on production server]]
 +  * [[https://stackoverflow.com/questions/5008675/msi-installer-cannot-find-installstate-when-using-custom-action-with-parameters|MSI Installer cannot find InstallState when using custom action with parameters]]
 +
 +=== アンインストール ===
 +アンインストール時に「Error 1001 savedState 適合しないデータが含まれており...」によりインストールできない。\\
 +
 +原因は不明、[[https://forest.watch.impress.co.jp/library/software/geekuninst/|GeekUninstallerツール]]で強制的にアンインストールしたことで整合性が一致しないのかも。\\
 +
 +下記の方法でログを出力することはできる。[[https://docs.lansa.com/14/ja/lansa022/content/lansa/vldtool19_0030.htm|msiexec.exe コマンドライン・オプション]]\\
 +エラー箇所 returned actual error code 1603
 +<code>
 +msiexec.exe /X "Setup.msi" /L*V "C:\Temp\msilog.log"
 +</code>
 +
 +対応として、例外エラーが出ても先に進めることを利用して例外エラーをスキップさせる。
 +
 +<code vb Uninstall>
 +Public Overrides Sub Uninstall(savedState As IDictionary)
 +    Try
 +        MyBase.Uninstall(savedState)
 +    Catch ex As Exception
 +        'MessageBox.Show(ex.Message + vbCrLf & ex.StackTrace)
 +    End Try
 +
 +    Dim path As String = Context.Parameters("TargetDir")
 +
 +    ProcessBatch(path, "DelService.bat")
 +
 +End Sub
 +</code>
 +===== Setup.msiとSetup.exeの違い =====
 +setup.exeは同梱のsetup.msiを実行するように作られており、msi からはフォローアップできないいくつかの処理(必須コンポーネントの.NET Framework のランタイムやWindowsInstallerの特定バージョンのインストールなど)をexe側で行う仕組みになっている。
 +
 +Windows Installer がインストールされてないとmsiファイルが認識できないので、その場合はsetup.exeからの実行が必要となります。\\
 +現状Windows OSではWindows Installerが標準でインストールされているので、Setup.msiのみで良い。
 +
 +  * [[http://bbs.wankuma.com/index.cgi?mode=al2&namber=42432&KLOG=73|setup.exeとxxx.msiの違いは何なんでしょうか?]]
 +  * [[http://nhiron.blog.jp/archives/1017697672.html|msiとsetup.exeのはなし]]
 +  * [[https://kaorun.hatenablog.com/entry/20151219/1450511313|今、あらためて確認するWindows Installer(MSI)の基本]]
 +
 +===== アップグレードインストール =====
 +Product CodeとProduct Versionは変更して、Upgrade Codeへ変更しない。\\
 +RemovePreviousVersionsプロパティをTrueにして、以前のバージョンを削除するようにしておく。
 +
 +  * [[https://dobon.net/vb/dotnet/deployment/upgrades.html#section4|セットアッププロジェクトによるアップデート]]\\
 +  * [[https://www.civil-design.net/index.html?main=https%3A%2F%2Fwww.civil-design.net%2Ffree%2Fcoach%2Fdev%2Fwi%2Fwi_upgrade.html|Windows インストーラ講座 - アップグレード(バージョンアップ)の考え方]]
 +
 +visualstudioinstallerでは、PackageCodeは見当たらない。 PackageCode = ProductCodeが既定と考える。
  
 ===== サービスのインストール ===== ===== サービスのインストール =====
it技術/dotnet/インストーラーの作成.txt · 最終更新: 2020/10/26 10:45 by yajuadmin