In-use files not updated by MSI-installer (Visual Studio Installer project)

后端 未结 5 714
清歌不尽
清歌不尽 2020-11-28 16:41

I\'m using the Visual Studio Installer Projects extension to build the MSI-installer for my application. However, my application is meant to be running at all times, and if

5条回答
  •  执念已碎
    2020-11-28 17:37

    REBOOT: How are you installing this MSI? What command line? If you set REBOOT=ReallySuppress on the command line, you will not be prompted for a reboot even if one is required to complete the installation of the product.

    msiexec.exe /i MySetup.msi /QN REBOOT=ReallySuppress
    

    If you are using a distribution system I suppose suppressing reboot prompts could be standard behavior. Then your product files should be put in place after a reboot (PendingFileRenameOperations or perhaps some newer mechanism).

    It is also possible that Visual Studio Installer Projects do something strange that I am not aware of.


    Log: I would try to create a good log file for the install, to determine what is going on:

    msiexec.exe /i C:\Path\Your.msi /L*v C:\Your.log
    

    Log All MSIs: Personally I like to enable logging for all MSI installations - as described in the "Globally for all setups on a machine" section in the above link.

    Interpreting an MSI log: interpreting a log file can be challenging sometimes. Here is an answer with some links to help with this.


    Reboot Manager: Reboot management is a very complex topic, and Windows features functionality - in the form of the restart manager feature - to try to minimize the need for reboots, by instead shutting down and restarting applications as part of an installation in an "auto-magical" fashion (application listens for messages and shuts itself down gracefully when told to, and the system may restart the application after the install - if configured to do so).

    Updating your application to comply with the restart manager is the only real fix for such problems that you see, in my opinon.

    • The section "Restart Manager" in this question tries to summarize how to implement such support (maybe just read the yellow section a bit down the page).
    • The Advanced Installer guys have a very nice, technical article about this: How do I add support for Windows Restart Manager to my application? Also linked to in the link directly above - still worth a direct link here I think.

提交回复
热议问题