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

Updater doesn't show after deleting reg key #633

Open
mbakervti opened this issue Jul 25, 2023 · 4 comments
Open

Updater doesn't show after deleting reg key #633

mbakervti opened this issue Jul 25, 2023 · 4 comments

Comments

@mbakervti
Copy link

I have this checking for update when the program starts up:

{
        AutoUpdater.Synchronous = true;
        AutoUpdater.RunUpdateAsAdmin = false;
        AutoUpdater.ClearAppDirectory = true;
        if (Keyboard.IsKeyDown(Key.LeftCtrl) || Keyboard.IsKeyDown(Key.RightCtrl))
	        AutoUpdater.ReportErrors = true;

	AutoUpdater.Start($"file://network_path/AppVersionInfo.xml");
}

When the user clicks the menu option I delete the registry key and call this function again...

string keyName = "SOFTWARE\\MyApp\\MyApp";
try
{
	using (RegistryKey key = Registry.CurrentUser.OpenSubKey(keyName, true))
	{
		if (key != null)
		{
			key.DeleteSubKeyTree("AutoUpdater");
		}
	}
}
catch
{
	// ignore, all it means is there's no key
}

The program also does some async operations and when it's done with them it calls the CheckForUpdate() each time when it's no longer busy. The update never shows a second time. What I'm trying to do is have AutoUpdater check again and show the dialog if there's an update available, but not make it mandatory.

Thanks
Mike

@ravibpatel
Copy link
Owner

Are you using Remind Later or Skip option when it shows up?

@mbakervti
Copy link
Author

mbakervti commented Jul 31, 2023

They're using the remind later option. I think they're setting it to 7 days. I'm deleting both keys so I'd like reset both options.
I should add that it works OK if I shut down the program and start it again. CheckUpdate returns a timer object, StartUpdate sets up the _remindLaterTimer. From then on the Start method bails out at AutoUpdater line 314 because _remindLaterTimer != null. It's not exposed so we can't reset it and the program doesn't check for it again. If I clear the reg keys and restart then it shows me the update.
Thanks for the time, Mike

@ravibpatel
Copy link
Owner

You can hide the Remind Later option instead.

https://github.com/ravibpatel/AutoUpdater.NET#disable-remind-later-button

@mbakervti
Copy link
Author

mbakervti commented Aug 1, 2023 via email

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