Login Register






Auto Update application vb.net <HELP> filter_list
Author
Message
Auto Update application vb.net <HELP> #1
Hello good people

I have this code :
Code:
Private Sub CheckForUpdates() Dim rope As String Dim wc As New WebClient rope = wc.DownloadString("http://mirzetaga.fileave.com/Update.txt") If rope.Contains("1.1") Then 'Change The 1.1 To The Latest Version. If MessageBox.Show("New update has been found, Download?", "YouTube Express; New Update!", MessageBoxButtons.YesNo, MessageBoxIcon.Exclamation) = DialogResult.Yes Then Dim sfdUpdate As New SaveFileDialog sfdUpdate.Title = "Select Location For; Program Update." sfdUpdate.Filter = "WinRAR archive (.rar)|*.rar" 'Easily Implementable If You Wish To Change To "Executable (.exe)|*.exe" If sfdUpdate.ShowDialog = Windows.Forms.DialogResult.OK Then My.Computer.Network.DownloadFile("http://mirzetaga.fileave.com/Update.rar", sfdUpdate.FileName) If IO.File.Exists(sfdUpdate.FileName) Then Process.Start(sfdUpdate.FileName) End If DialogResult.No Then Me.ResumeLayout() End If End If End If End If End If Exit Sub End Sub

That is visual basic update but now i need source where when i click update application that he delete my program and extract new update that program downloaded or he can just replace... So i need to he updates automaticaly application and start that update.

PLEASE HELP !!!

Thanks all !!!!!
**new**


YouTube BOT v3.1 you must try it Smile
Go tO YouTube Bot v3.1


Reply

RE: Auto Update application vb.net #2
(07-05-2011, 06:20 PM)The 7th Sage Wrote: Use File.delete command before you download the new update. Thats all you need.

That is good but i cant find where the windows install application Sad

And can you tell me what will i need to use to update what files ?

**new**


YouTube BOT v3.1 you must try it Smile
Go tO YouTube Bot v3.1


Reply

RE: Auto Update application vb.net <HELP> #3
or just create an initial setup package...
little trick;
write the destination path to a registry entry on initial setup... on update, just read out that registry key to find where it has been installed..
To write the install path to your registry on install, open up the registry editor in your setup project and add a key similar to this;
installPath = [TARGETDIR]
[TARGETDIR] will be taken from your setup package (even if you let your users decide to install into different folder than the default program folder)

Reply

RE: Auto Update application vb.net <HELP> #4
(07-07-2011, 05:06 PM)blowdoof Wrote: or just create an initial setup package...
little trick;
write the destination path to a registry entry on initial setup... on update, just read out that registry key to find where it has been installed..
To write the install path to your registry on install, open up the registry editor in your setup project and add a key similar to this;
installPath = [TARGETDIR]
[TARGETDIR] will be taken from your setup package (even if you let your users decide to install different folder than the default program folder)

I read this 10 times but i cant understand what you want to say can u please more explain.
[*] i realy dont know how to do this and where i find it (write the destination path to a registry entry on initial setup)

**new**


YouTube BOT v3.1 you must try it Smile
Go tO YouTube Bot v3.1


Reply

RE: Auto Update application vb.net <HELP> #5
- create a new setup project (or modify an existing)
- in that setup project, you can define/specify which registry values you want to add during setup
..there you can define a registry entry for the install path.. which you can use afterwards for retrieving the exact install path of your application

Reply

RE: Auto Update application vb.net <HELP> #6
I understand you now but can you tell me what type of setup project i must use (InstallShield,Setup Project,Setup Wizard...) I think in install shield have option for registry editor, but i dont have it and when it make new setup.exe and when user open it, then he show msgbox something like "This is trial version of install shield"... ? What i need to use (what type of the setup project)
**new**


YouTube BOT v3.1 you must try it Smile
Go tO YouTube Bot v3.1


Reply

RE: Auto Update application vb.net <HELP> #7
just create a new setup project

Reply

RE: Auto Update application vb.net <HELP> #8
Regardsless of how you install now it is best to use a installer which allows you to write registryentries. Best place to write is here HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\App Paths.
Conflict is inevitable, but combat is optional
My humble self-defense site
Use Option Strict = On when coding with VB.NET

Reply