ravibpatel / AutoUpdater.NET

AutoUpdater.NET is a class library that allows .NET developers to easily add auto update functionality to their classic desktop application projects.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Application does not re-open after updating new version with highest privileges

phuocminh6464 opened this issue · comments

Hi @ravibpatel,

I created app.manifest file in my WPF app source and set <requestedExecutionLevel level="highestAvailable" uiAccess="false" /> to run with highest privileges because my app will be installed in C disk by .msi file. I also set AutoUpdater.RunUpdateAsAdmin = true; before calling AutoUpdater.Start. My xml file is:

<?xml version="1.0" encoding="UTF-8"?>
<item>
  <version>2.0.0.0</version>
  <url>D:\Publish\SetupProject.msi</url>
  <args>/quiet /qn</args>
</item>

I add <args> tag to install msi installer in silent but after downloading and installing (version of app in control panel is increased) the application did not auto re-open. Am I missing something? I am using the AutoUpdater.NET-1.7.6 version.
Thanks in advance.

Update: I changed app.manifest file to <requestedExecutionLevel level="requireAdministrator" uiAccess="false" />, but app is still not open

It launches the updated executable only if you are using the zip file as the update file. For EXE and MSI installer, you have to manage the launch in the installer itself.

you have to manage the launch in the installer itself.

After downloading new version, application will be closed to update so what can I do to launch the MSI installer again

It should automatically execute the MSI installer after it exits the application. So, installation should be done successfully. As you are using Silent flag, it may not show the UI.

yeah, I understand it. But is it ok if I run MSI installer to install the first version and then using the zip file to update new version

Yes, That will work fine.

You can also continue using MSI for both update and initial version. I personally prefer it if you don't want to maintain to separate package for initial installation and update. Most installers nowadays provide the ability to launch the updated application after installation finishes. I used NSIS and Inno Setup in the past and they both provide this functionality.

Yes, That will work fine.

That's great. Thank you so much.

You can also continue using MSI for both update and initial version. I personally prefer it if you don't want to maintain to separate package for initial installation and update. Most installers nowadays provide the ability to launch the updated application after installation finishes. I used NSIS and Inno Setup in the past and they both provide this functionality.

Because my application will run in kiosk so I want to update version in silently and not need user interact. As this reason I want to do in the simplest way and using separate package is not problem.