2017-07-10 20 views
2

私のインストーラは、アップデータファイルがすでに存在する場合はスキップする必要がありますが、ファイルはアプリケーションによって使用されており、Inno Setupのアプリケーションで既に使用されているファイルはテストしないでください

すべてのアプリケーションを自動的に閉じることができませんでした。続行する前に、セットアップによって更新が必要なファイルを使用してすべてのアプリケーションを終了することをお勧めします。

再試行をクリックして再試行し、無視して続行するか、中止してインストールをキャンセルします。セットアップスクリプトで

アップデータファイルはファイルが将来的にパッチが適用されていないことを確認する必要がありますonlyifdoesntexistドキュメントフラグによると、この

Source: "..\bin\Release\updater\*"; DestDir: "{app}\updater"; Flags: onlyifdoesntexist 

のようにインポートされます。

updaterディレクトリ以外のすべてのファイルを削除して、これらのファイルが原因で問題が発生していないかどうかを確かめました。何か案は?ここで

は、ログファイルはonlyifdoesntexistが実際にアプリケーションを実行することにより、使用中のファイルをチェックする目的のために評価されていない

2017-07-10 14:12:59.229 Log opened. (Time zone: UTC+02:00) 
2017-07-10 14:12:59.229 Setup version: Inno Setup version 5.5.9 (u) 
2017-07-10 14:12:59.229 Original Setup EXE: C:\Users\pikausp\AppData\Roaming\TMEgadget4\updater.exe 
2017-07-10 14:12:59.229 Setup command line: /SL5="$F0962,149593,121344,C:\Users\pikausp\AppData\Roaming\TMEgadget4\updater.exe" /SPAWNWND=$140E9A /NOTIFYWND=$C0CAA /VERYSILENT 
2017-07-10 14:12:59.229 Windows version: 10.0.14393 (NT platform: Yes) 
2017-07-10 14:12:59.229 64-bit Windows: Yes 
2017-07-10 14:12:59.229 Processor architecture: x64 
2017-07-10 14:12:59.229 User privileges: Administrative 
2017-07-10 14:12:59.229 64-bit install mode: No 
2017-07-10 14:12:59.231 Created temporary directory: C:\Users\pikausp\AppData\Local\Temp\is-88HJM.tmp 
2017-07-10 14:12:59.307 RestartManager found an application using one of our files: TMEgadget.Updater 
2017-07-10 14:12:59.307 Can use RestartManager to avoid reboot? Yes (0) 
2017-07-10 14:12:59.311 Starting the installation process. 
2017-07-10 14:12:59.313 Shutting down applications using our files. 
2017-07-10 14:13:29.359 Some applications could not be shut down. 
2017-07-10 14:13:29.359 Message box (Abort/Retry/Ignore): 
          Setup was unable to automatically close all applications. It is recommended that you close all applications using files that need to be updated by Setup before continuing. 

          Click Retry to try again, Ignore to proceed anyway, or Abort to cancel installation. 
2017-07-10 14:13:34.796 User chose Abort. 
2017-07-10 14:13:34.796 User canceled the installation process. 
2017-07-10 14:13:34.796 Rolling back changes. 
2017-07-10 14:13:34.797 Starting the uninstallation process. 
2017-07-10 14:13:34.797 Uninstallation process succeeded. 
2017-07-10 14:13:34.797 Deinitializing Setup. 
2017-07-10 14:13:34.802 Log closed. 
+0

これは再生できません。 [mcve]のログファイル(単一ファイルインストール)を表示してください。 –

+0

@MartinPrikrylが質問を更新しました。 – pikausp

+0

私はすぐにログを追加します – pikausp

答えて

3

です。

しかし、Check parameterが評価されます。

だから、このように存在するかどうかのテストを実施することができます

[Files] 
Source: "..\bin\Release\updater\*"; DestDir: "{app}\updater"; Check: OnlyIfDoesntExist 

[Code] 

function OnlyIfDoesntExist: Boolean; 
begin 
    Result := not FileExists(ExpandConstant(CurrentFilename)); 
end; 

もう一つの方法は、創造CloseApplicationsFilter directiveupdaterフォルダ内のファイルを含めるしないように設定することです。

関連する問題