Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Auto updating application (by an NSIS installer) fails silently #209

Open
hankbao opened this issue Apr 3, 2020 · 6 comments
Open

Auto updating application (by an NSIS installer) fails silently #209

hankbao opened this issue Apr 3, 2020 · 6 comments

Comments

@hankbao
Copy link

hankbao commented Apr 3, 2020

Firstly, I want to thank you for providing this neat project. I'm using winsparkle to auto-update my application since its first version. After I updated the application to run as administrator, I encountered this particular problem.

Let's say there is a version 0.1 running as administrator. The version 0.2 installer comes with an NSIS installer and the installer itself is also set to run as administrator. Without the silent switch (/S) set in my appcast.xml, the updating rolls out smoothly. However, if the silent switch is on, the updating fails silently. Not a single file will be updated after the application exited. I can see the installer launching and exit shortly in ProcessMonitor.

I've checked the installer downloaded and it's OK. I can even run it manually with the silent switch on successfully.

Any hints would be greatly appreciated.

@hankbao
Copy link
Author

hankbao commented Apr 3, 2020

I've also looked into the source code and found out that the installer is launched by ShellExecuteEx. So I tried to set the lpVerb of SHELLEXECUTEINFO to runas but it fails still.

@vslavik
Copy link
Owner

vslavik commented Apr 4, 2020

Any hints would be greatly appreciated.

Please read this article and proceed per it.

@kschmidtdev
Copy link

What does your appcast xml look like? I have a similar scenario working (winsparkle + nsis running with /s) - although it installs to a user data folder, so it doesn't require running as administrator.

@hankbao
Copy link
Author

hankbao commented Apr 9, 2020

Any hints would be greatly appreciated.

Please read this article and proceed per it.

Sorry for my vague description. I'm using winsparkle v0.6.0 with NSIS v3.05

What does your appcast xml look like? I have a similar scenario working (winsparkle + nsis running with /s) - although it installs to a user data folder, so it doesn't require running as administrator.

Previously I'm working in the same scenario as yours. But I switched to a scenario that running the app as an administrator later. The NSIS installer itself has been set to run as an administrator.

Here's my testing appcast file which worked before and failing now. It's just a regular appcast.xml

<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:sparkle="http://www.andymatuschak.org/xml-namespaces/sparkle">
    <channel>
        <title>Appcast</title>
        <description>Updates to Windows app</description>
        <language>cn</language>
        <item>
            <title>Version 1.0.0.0</title>
            <sparkle:releaseNotesLink>
                http://192.168.1.100:8888/release_note.html
            </sparkle:releaseNotesLink>
            <pubDate>Fri, 19 Apr 2019 12:25:21 +0800</pubDate>
            <enclosure url="http://192.168.1.100:8888/installer_1.0.0.0.exe"
                       sparkle:os="windows"
                       sparkle:dsaSignature="DSA-SIGNATURE-HERE"
                       sparkle:version="1.0.0.0"
                       sparkle:installerArguments="/S"
                       length="0"
                       type="application/octet-stream" />
        </item>
    </channel>
</rss>

@hankbao
Copy link
Author

hankbao commented Apr 9, 2020

I found that if any message box popped within the installer, it then runs smoothly without any issue, even in the silent mode. But if no UI presented, it fails silently.

@kschmidtdev
Copy link

Was it working before the running as administrator change? Maybe try a custom application instead of the NSIS installer, see if there is an error code or something happening.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants