none
Request Help for Create application online update RRS feed

  • Question

  • Hello Friends,

    Please help me for this, i created the vb.net (VS2013) application. i need check software update before loading (online). so i found some cord on internet, but that is not working. i'm really very thankfull if any one can send me sample project with correct code. 

    1st i create 2 file in droupbox like this : 

    https://www.dropbox.com/s/izc0xrq0jpctt02/Version.txt?dl=0    >>>> for check version

    https://www.dropbox.com/s/k6bu9ujwftq44cg/AutoDownloader.exe?dl=0   >>>> Application update

    I need when my application loading it will check update version with text file on droupbox, if update available then download update and make install....

    I used : WebBrowser1 / Button1 / ProgressBar1 / Timer1 / Label1 / Label2         

    this is the code :

    Public Class Form2
        Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click
            Button1.Enabled = False
            Button1.Text = "Checking for updates..."
            Timer1.Start()
            Label1.Text = ProgressBar1.Value
            CheckForUpdates()
        End Sub
        Public Sub CheckForUpdates()
            If ProgressBar1.Value = 100 Then
                Dim request As System.Net.HttpWebRequest = System.Net.HttpWebRequest.Create("https://dl.dropbox.com/s/izc0xrq0jpctt02/Version.txt?dl=0")
                Dim response As System.Net.HttpWebResponse = request.GetResponse()
    
                Dim sr As System.IO.StreamReader = New System.IO.StreamReader(response.GetResponseStream())
    
                Dim newestversion As String = sr.ReadToEnd()
                Dim currentversion As String = Application.ProductVersion
                If newestversion.Contains(currentversion) Then
                    Button1.Text = ("You are up todate!")
                    Label2.Text = ("You may now close this dialog")
                Else
                    Button1.Text = ("Downloading Update!")
                    WebBrowser1.Navigate("https://dl.dropbox.com/s/k6bu9ujwftq44cg/AutoDownloader.exe?dl=0")
                    Label2.Text = ("You may now close this dialog")
                End If
            End If
        End Sub
    
        Private Sub Timer1_Tick(sender As Object, e As EventArgs) Handles Timer1.Tick
            ProgressBar1.Increment(5)
            Label1.Text = ProgressBar1.Value
            If ProgressBar1.Value = 100 Then
                Timer1.Stop()
                If ProgressBar1.Value = 100 Then
                    Dim request As System.Net.HttpWebRequest = System.Net.HttpWebRequest.Create("https://dl.dropbox.com/s/izc0xrq0jpctt02/Version.txt?dl=0")
                    Dim response As System.Net.HttpWebResponse = request.GetResponse()
    
                    Dim sr As System.IO.StreamReader = New System.IO.StreamReader(response.GetResponseStream())
    
                    Dim newstversion As String = sr.ReadToEnd()
                    Dim currentversion As String = Application.ProductVersion
    
                    If newstversion.Contains(currentversion) Then
                        Button1.Text = ("You are up todate!")
                        Label2.Text = ("You may now close this dialog")
                    Else
                        Button1.Text = ("Downloading update!")
    
                        WebBrowser1.Navigate("https://dl.dropbox.com/s/k6bu9ujwftq44cg/AutoDownloader.exe?dl=0")
    
                        Label2.Text = ("You may now close this dialog")
                    End If
                End If
            End If
        End Sub
    End Class   
                                                                                                   

    This is the error

    Please help me to learn this task.... sorry about my English typing... thank you... 


    RohanD


    Thursday, June 29, 2017 8:39 PM

All replies

  • Hi RohanD,

    Welcome to the MSDN forum.

    Refer to your description, your issue is about the VB development. Since our forum is to discuss the VS IDE, I will help you move this thread to the appropriate forum: Visual Studio Languages  >  Visual Basic to seek for a more professional support, thank you for your understanding.

    Best regards,

    Sara


    MSDN Community Support<br/> Please remember to click &quot;Mark as Answer&quot; the responses that resolved your issue, and to click &quot;Unmark as Answer&quot; if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact <a href="mailto:MSDNFSF@microsoft.com">MSDNFSF@microsoft.com</a>.

    Friday, June 30, 2017 2:27 AM
  • I need when my application loading it will check update version with text file on droupbox, if update available then download update and make install.

    The server message indicates that what you are doing is not allowed.

    To access files from DropBox, use the API provided: https://www.dropbox.com/developers

    Friday, June 30, 2017 4:06 AM
  • Thank you

    RohanD

    Friday, June 30, 2017 5:42 PM
  • HI,

    Thank you for your help.... i'l try this.. and feedback soon thanks again....!!!


    RohanD

    Friday, June 30, 2017 5:43 PM
  • HI,

    I installed droupbox.api.... but its not working....


    RohanD

    Friday, June 30, 2017 6:19 PM
  • I installed droupbox.api.... but its not working...

    If you want assistance with making the procedure work you will need to provide much more detail than that.  What exactly have you implemented, what should have happened, what actually happened?

    Otherwise, ask at the dropbox support site.

    Friday, June 30, 2017 9:49 PM