vslavik / winsparkle

App update framework for Windows, inspired by Sparkle for macOS
http://winsparkle.org
Other
1.3k stars 265 forks source link

[Question] Silent update does not restart the application #268

Closed trietfidelia closed 6 months ago

trietfidelia commented 6 months ago

Hi @vslavik, I'm using WinSparkle in my windows application for silent update. It works very well, but the app doesn't start again after installing

Here is my appcast:

<rss xmlns:sparkle="http://www.andymatuschak.org/xml-namespaces/sparkle" version="2.0">
    <channel>
        <title>MyApp</title>
        <description>Most recent updates to MyApp</description>
        <language>en</language>
        <item>
            <title>Version 1.0.3+4</title>
            <pubDate>Wed, 13 Mar 2024 17:25:08</pubDate>
            <enclosure url="http://127.0.0.1:8080/1.0.3%2B4/myapp-windows-setup.exe" sparkle:dsaSignature="MD0CHEhKshjccYuNCXjoTRgJNkRnrA21zyMae0/GpWoCHQCaM5/YVY+AGsr1xSNhUXlJZuegTS2Kke+tquTa" 
            sparkle:version="1.0.3+4" sparkle:os="windows" length="0" type="application/octet-stream" 
            sparkle:installerArguments="/SILENT /SP- /NOICONS /RESTARTAPPLICATIONS /LOG" />
        </item>
    </channel>
</rss>

I read through Inno Setup's documents and found out if Setup is silent then after the installation is complete, a Reboot pop-up will appear, but nothing happens image

I've check the log file and saw "Need to restart Windows? No" line:

2024-03-14 10:29:50.444   Creating the icon.
2024-03-14 10:29:50.475   Successfully created the icon.
2024-03-14 10:29:50.475   Saving uninstall information.
2024-03-14 10:29:50.475   Renaming uninstaller.
2024-03-14 10:29:50.475   Deleting uninstall key left over from previous administrative 64-bit install.
2024-03-14 10:29:50.475   Creating new uninstall key: HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Uninstall\BEE2E58D-9832-4358-B939-897A40C40E67_is1
2024-03-14 10:29:50.475   Writing uninstall key values.
2024-03-14 10:29:50.475   Detected previous non administrative install? No
2024-03-14 10:29:50.475   Detected previous administrative 32-bit install? No
2024-03-14 10:29:50.475   Installation process succeeded.
2024-03-14 10:29:50.475   Attempting to restart applications.
2024-03-14 10:29:50.716   Need to restart Windows? No
2024-03-14 10:29:50.716   Deinitializing Setup.
2024-03-14 10:29:50.732   Log closed.

I want to change the value of "Need to restart Windows" to yes, but I don't know how? Do you have any tips that can help me in this situation? Thank you very much

vslavik commented 6 months ago

This is a bug tracker for WinSparkle; it is neither a questions forum nor Inno Setup support forum.

vslavik commented 6 months ago

If you want to use /RESTARTAPPLICATIONS, you should use win_sparkle_set_shutdown_request_callback() to not shutdown the app before running the installer.