Close running version of program before installing update (Inno Setup)

前端 未结 10 1251
囚心锁ツ
囚心锁ツ 2020-12-23 12:24

This should be simple, I need to stop any previous version of my program from running when the installer starts.

Most people suggested making an exe wh

10条回答
  •  慢半拍i
    慢半拍i (楼主)
    2020-12-23 12:50

    Well, I think the easier way to perform this may be creating a DLL in Delphi that detects if your program is running and ask the user to close it, put that DLL in your setup and use the flag "dontcopy" (check in http://www.jrsoftware.org/ishelp/ under Pascal Scripting \ Using DLLs for an example).

    Btw, next time use mutexes, Inno Setup also support that and is far more easier.

    EDIT: and for extracting a file (if you want to use that .exe you mention), just use ExtractTemporaryFile().

提交回复
热议问题