How can I implement automatic updating?
5 hours ago, AluminiumTech said:So would this work?
private void checkForUpdate()
{
string insiderPreviewURL = "https://1drv.ms/t/s!Ar65S5uonmfNmPhZqSrE3JEbAGju2Q";
string releaseURL;string version;version = Settings.App.Default.Version;WebClient web = new WebClient();string newVersion = web.DownloadString(insiderPreviewURL);if (newVersion.Contains(Settings.App.Default.Version))
{
Form update = new UpdateAvailable();
update.ShowDialog();
}[/Code]
Unsure, the code should likely work. That is very simple for you to test. What I'm unsure of is if the URL will change if the file is updated with new content. I don't think it will but it's a possibility. Also, now you are dependent on that this URL doesn't change. Which could happen, Microsoft may change what servers the file is stored on or something, giving you a new URL.
If you instead were to buy a domain, lets say "altech.com" or something, and point it to the cloud hosted file (https://1drv.ms/t/s!Ar65S5uonmfNmPhZqSrE3JEbAGju2Q). Then if the URL changes or in the unlikely scenario that Microsoft goes bankrupt or similar, you can easily just point the altech.com domain somewhere else and your users won't be affected.
I understand if you do not want to pay for hosting and that you may be unable to host from home (if you are however able to do that, apache on a linux server is actually rather simple to setup). But buying a domain is generally very cheap and it could really help you out in scenarios like this one, if the Onedrive URL were to change in the future for some reason, just point it to wherever it is now.
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now