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

AutoUpdate.NET does not install #690

Open
FelipeReque opened this issue Jun 2, 2024 · 1 comment
Open

AutoUpdate.NET does not install #690

FelipeReque opened this issue Jun 2, 2024 · 1 comment

Comments

@FelipeReque
Copy link

FelipeReque commented Jun 2, 2024

    AutoUpdater.Start("myxml");
    AutoUpdater.ShowSkipButton = false;
    AutoUpdater.ShowRemindLaterButton = false;
    AutoUpdater.RunUpdateAsAdmin = true;
    AutoUpdater.UpdateMode = Mode.ForcedDownload;
    AutoUpdater.ReportErrors = true;
    AutoUpdater.Mandatory = true;

The file is being downloaded to the folder where the software is already installed, it unzips the files but does not install the new version, how can I solve this to replace the old version and install the new one

I'm using netframework 4.8.

I am zipping the complete release folder with the setup and installation msi.

I need the update to be done automatically.

@ravibpatel
Copy link
Owner

You should zip the updated app directly or use MSI file as update file directly. If your MSI file needs another file to work, then you can zip everything and set ExecutablePath to MSI path. For example, if your MSI file name is setup.msi then the following should work.

AutoUpdater.ExecutablePath = "setup.msi";

By default, it extracts the zip file in application directory. You can change that behavior by modifying InstallationPath. You will also need to change the ExecutablePath if you do that.

var currentDirectory = new DirectoryInfo(Application.StartupPath);
if (currentDirectory.Parent != null)
{
    AutoUpdater.InstallationPath = Path.Combine(currentDirectory.Parent.FullName, "temp");
}
AutoUpdater.ExecutablePath = "temp/setup.msi";

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

2 participants