SilabGarza - RS Private Server  
Home Forum Play Register Store Market Highscores Mark Forums Read
Go Back   SilabGarza - RS Private Server > SilGar Media > Computers > Programming
Reload this Page How to Update a Program


How to Update a Program
Old
  (#1 (permalink))
Guided is Offline
image
 
Guided's Avatar
 
Posts: 228
Cookies Given: 0
Cookies Received: 0
Time Online: 4 d 16 h 3 m
   
Default How to Update a Program - 08-06-2011, 11:47 PM

Project Download (Non Automatic Update): Updater - Non Automatic.rar

Project Download (Automatic Update): Updater - Automatic.rar

Note: It will download the updated program via the default web browser.

Non Automatic Update Code: (They have to press a button to check for an update, then press a button to update)

Requirements:

2 Buttons

Code:
Imports System.Net

Public Class Form1
    Dim CurrentVersion1 As String = ("Version Number")
#Region "Update"
    Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
        Dim Web As New WebClient
        Dim version As String = Web.DownloadString("http://www.site.com/version.txt") 'Make this the location of a .txt file on a webhost that contains the version number in the text file.
        If version.Contains(CurrentVersion1) Then 'If the text file contains the state file version above then it
            MsgBox("No Update Found!", MsgBoxStyle.Information, "Update") 'doesn't update and shows a message box.
            Button2.Enabled = False 'Keeps button2 disabled if it already isnt.
        Else
            MsgBox("Update Found You Can Now Download It!", MsgBoxStyle.Information, "Update") 'allows you to update with Button2 and shows a message box saying you can update.
            Button2.Enabled = True 'Enables button2 if an update is available.
        End If
    End Sub

    Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click
        Process.Start("http://www.site.com/UpdateProgramsUrl") 'Replace with the location they will download the updated program
    End Sub
#End Region
End Class
Automatic Update Code: (Once the form loads it will check for an update, if their is an update it will download it via the default web brower)

Requirements:

Nothing

Code:
Imports System.Net

Public Class Form1
    Dim CurrentVersion1 As String = ("Version Number")
#Region "Update"
    Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
        Dim Web As New WebClient
        Dim version As String = Web.DownloadString("http://www.site.com/version.txt") 'Make this the location of a .txt file on a webhost that contains the version number in the text file.
        If version.Contains(CurrentVersion1) Then 'If the text file contains the state file version above then it
            MsgBox("No Update Found!", MsgBoxStyle.Information, "Update") 'doesn't update and shows a message box.
        Else
            MsgBox("Update Found You Can Now Download It!", MsgBoxStyle.Information, "Update") 'allows you to update with Button2 and shows a message box saying you can update.
            Process.Start("http://www.site.com/UpdateProgramsUrl") 'Replace with the location they will download the updated program
        End If
    End Sub
#End Region
End Class
  
Old
  (#2 (permalink))
Iron Doom is Offline
hu3hu3hu3hu3hu3
image
 
Iron Doom's Avatar
 
Posts: 3,456
Cookies Given: 82
Cookies Received: 25
Time Online: 20 d 11 h 6 m
Clan: Silabgarza's army
   
Default 08-06-2011, 11:49 PM

lol wtf is this?
  
Old
  (#3 (permalink))
iEnigma is Offline
image
 
iEnigma's Avatar
 
Posts: 520
Cookies Given: 0
Cookies Received: 0
Time Online: 4 d 14 h 6 m
Clan: The Colored Kids
   
Default 08-06-2011, 11:52 PM

Can't you just go to the website you downloaded the program/application from and it'll have an automatic patch update?

That's what I do, and I get desktop notifications if one of my applications are out-of-date/need to be updated.
  
Old
  (#4 (permalink))
Guided is Offline
image
 
Guided's Avatar
 
Posts: 228
Cookies Given: 0
Cookies Received: 0
Time Online: 4 d 16 h 3 m
   
Default 08-06-2011, 11:57 PM

Quote:
Originally Posted by Iron Doom View Post
lol wtf is this?
Simple way to update your programs.


Quote:
Originally Posted by iEnigma View Post
Can't you just go to the website you downloaded the program/application from and it'll have an automatic patch update?

That's what I do, and I get desktop notifications if one of my applications are out-of-date/need to be updated.
No idea what you're talking about
  
Old
  (#5 (permalink))
Forget is Offline
Senior Member

image
 
Forget's Avatar
 
Posts: 421
Cookies Given: 0
Cookies Received: 0
Time Online: 2 d 14 h 4 m
   
Default 08-07-2011, 12:06 AM

lol , most of the time , a notification pops up when youu run the program ,

and it'll say that it needs to be updated and it will update its self .


anyways , goodjob on the thingy .



click here for my YouTube .
  
Old
  (#6 (permalink))
sconder10 is Offline
<span style="color: firebrick">Jared-OldFag♥-Sconder10</span>
image
 
sconder10's Avatar
 
Posts: 1,025
Cookies Given: 1
Cookies Received: 0
Time Online: 14 d 17 h 35 m
Clan: LAD - Owner
   
Default 08-08-2011, 08:38 AM

Thats VB.NET isn't it? :S


v v v^ ^ ^
  
Old
  (#7 (permalink))
Guided is Offline
image
 
Guided's Avatar
 
Posts: 228
Cookies Given: 0
Cookies Received: 0
Time Online: 4 d 16 h 3 m
   
Default 08-08-2011, 07:15 PM

Quote:
Originally Posted by sconder10 View Post
Thats VB.NET isn't it? :S
Yep and it works great as long as there are no typo's :3
  
Old
  (#8 (permalink))
Rodrigues is Offline
Senior Member
image
 
Rodrigues's Avatar
 
Posts: 1,556
Cookies Given: 37
Cookies Received: 12
Time Online: 27 d 5 h 20 m
Clan: None.
   
Default 08-08-2011, 08:03 PM

Quote:
Originally Posted by Create Acc View Post
This isn't a virus.. If you actually took the time to read the program (it's English for crying out loud), you'd you know it wasn't a virus..

Make something harder; this is too simple. Haven't programmed in BASIC in so long.. Might actually go back to it just to catch up on things once I feel like it.




^ Thanks, Nigma.


^ Thanks, Devon.


^ Thanks, Xanadu.


^ Thanks, Martin.

In-game/Forums Name - Rodrigues
RS Name - dom platano2
  
Old
  (#9 (permalink))
Zvp is Offline
<span style="color: greenyellow">-Epic Gfxer-</span>
image
 
Zvp's Avatar
 
Posts: 2,455
Cookies Given: 0
Cookies Received: 1
Time Online: 12 d 34 m
Clan: KAPP
   
Default 08-14-2011, 04:02 PM

This is pretty simple bro, but nice job anyways



Click the picture for my gallery.

Gifts:
Spoiler


[Steven] [Harry] [Jordan] [Niels] [Benji] [Aaron] [Martin]
  
adsense code2.3
Closed Thread

Bookmarks

How to Update a Program

Programming




Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
adsense2.6
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT -7. The time now is 11:59 PM.





Powered by vBulletin® Version 3.8.8
Copyright ©2000 - 2017, vBulletin Solutions, Inc.