Hallo,
ich habe ein Patcher/Aktualisierungsprogramm welcher mit Hilfe von MD5 - Hash auf Updates prüft.
Dies über eine updatelist.xml:
Das Problem ist, das er jede andere .xml Datei auch als Update sieht und diese ständig neu runterläd.
Meine Frage nun, wie kann ich es einstellen, das er unabhänig von einer anderen .xml Datei immer wieder davon ausgeht das neue updates da sein.
lG Tom
ich habe ein Patcher/Aktualisierungsprogramm welcher mit Hilfe von MD5 - Hash auf Updates prüft.
Dies über eine updatelist.xml:
Das Problem ist, das er jede andere .xml Datei auch als Update sieht und diese ständig neu runterläd.
Meine Frage nun, wie kann ich es einstellen, das er unabhänig von einer anderen .xml Datei immer wieder davon ausgeht das neue updates da sein.
VB.NET-Quellcode
- Imports System.IO
- Imports System.Text
- Imports System.Security.Cryptography
- Public Class Update
- Dim UPDATEURL As String = "https://URL/update.source/"
- Dim UPDATELIST As String = "https://URL/update.source/updatelist.xml"
- Dim WithEvents UpdateListDownloader As New System.Net.WebClient
- Dim WithEvents UpdateDownloader As New System.Net.WebClient
- Private Sub Form1_Shown(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Shown
- MB.Hide()
- Prozent.Hide()
- lbl.Hide()
- Anzahl.Hide()
- UpdateListDownloader.Proxy = Nothing
- Update_List.RunWorkerAsync()
- End Sub
- Private Sub Update_List_DoWork(ByVal sender As Object, ByVal e As System.ComponentModel.DoWorkEventArgs) Handles Update_List.DoWork
- Dim AppPath As String = My.Computer.FileSystem.CurrentDirectory
- UpdateListDownloader.DownloadFileAsync(New Uri(UPDATELIST), AppPath & "/updatelist.xml")
- End Sub
- Private Sub UpdateListDownloader_DownloadFileCompleted(ByVal sender As Object, ByVal e As System.ComponentModel.AsyncCompletedEventArgs) Handles UpdateListDownloader.DownloadFileCompleted
- Progress_Total.Value = 0
- Update_Downloader.RunWorkerAsync()
- End Sub
- Dim ANZAHLDLS As Integer = 0
- Dim Busy As Boolean = Nothing
- Dim DLURLS As New List(Of String)
- Private Sub Update_Downloader_DoWork(ByVal sender As System.Object, ByVal e As System.ComponentModel.DoWorkEventArgs) Handles Update_Downloader.DoWork
- If Update_Downloader.CancellationPending = True Then
- Update_Downloader.CancelAsync()
- End If
- Dim AppPath As String = My.Computer.FileSystem.CurrentDirectory
- Dim xDocument As New Xml.XmlDocument
- xDocument.Load(AppPath & "/updatelist.xml")
lG Tom
Dieser Beitrag wurde bereits 2 mal editiert, zuletzt von „Tom Jessel“ ()