[Help]Loader Autoupdater Issue

Posts 1–15 of 18 · Page 1 of 2
[Help]Loader Autoupdater Issue
My Loader is almost finished. Now i just need to change something at the Autoupdater. My Autoupdater just knows when the version is outdated, then it opens the savefiledialog and asks where I want to Save the new Loader.
But thats what I want to change. I want that when it detects that there is a new Vesion, it removes the current Applicationa and opens automatically the newest Version. Just delete the outdated and actually opened Form, and Start the newest Form.

Any1 knows how to do that ? Would be great if any1 helps me!

I already tried much but didnt got it to work!
Process.Start()

IO.File.Delete()
Quote Originally Posted by Hawky1337 View Post
Process.Start()

IO.File.Delete()
Thanks! Will try that and edit

Well how can i delete the opened programm as its not closed yet.

Process.Start(Application.StartupPath & "\" & "TEST.exe")
IO.File.Delete(Application)
Quote Originally Posted by Sydney View Post
Thanks! Will try that and edit

Well how can i delete the opened programm as its not closed yet.

Process.Start(Application.StartupPath & "\" & "TEST.exe")
IO.File.Delete(Application)
You need to delete the old application in the updated one.

You may also start the updated one with a parameter and in the updated application, you check if it was started with a parameter,if so, delete the old one.

Your choice

Tips:

Application.executeablepath
io.file.delete()
io.file.exists()
io.file.rename()
process.start()
Quote Originally Posted by cosconub View Post
kong try this: http://www.mpgh.me/forum/33-visual-b...dater-tut.html

i used one that use webclient to get the version number and a server

so when you update your program you +1 the number and

+1 the number on the server..
Lol read the topic. I know how to make a autoupdater. First read the topic!
oh ok well then

do this

Code:
dim vs as new string
vs = vs +1
Process.Start(Application.StartupPath & "\" & "YourApp"&vs".exe")
IO.File.Delete(Application)
that should work without deleting your current version

sorry i have no refrances im at work
Quote Originally Posted by cosconub View Post
oh ok well then

do this

Code:
dim vs as new string
vs = vs +1
Process.Start(Application.StartupPath & "\" & "YourApp"&vs".exe")
IO.File.Delete(Application)
that should work without deleting your current version

sorry i have no refrances im at work
But then its not replacing the currently opened App.

Maybe when downlaoded then rename the new app into the same name as mine. But then it gives an error that theres already a app with that name, then maybe i could delete the current one anyhow.

Any1 knows how to replace 2 .exe apps ?

Like replace the new app saved at "C:\NewApp.exe

With the current one.

Any1 knows how to replace 2 .exe ?
As I said. Let's say the downloaded file is named Test1.exe and the current one is test.exe.

Put the following check on test1.exe:

[php]
Private Sub CheckReplace()
If IO.Path.GetFileNameWithoutExtension(Application.Ex ecutablePath) <> "Test" Then
If IO.File.Exists(IO.Path.Combine(Application.Startup Path, "Test.exe")) Then
IO.File.Delete(IO.Path.Combine(Application.Startup Path, "Test.exe"))
End If
My.Computer.FileSystem.RenameFile(Application.Exec utablePath, "Test.exe")
End If
End Sub
[/php]

Or something like that...
konga, you could always

make it so after it deletes it renames the app..
Quote Originally Posted by cosconub View Post
konga, you could always

make it so after it deletes it renames the app..
It is included in my code
ohie,,, cool

bubb when u unbanned and i need help with your user overveiw
Just post your problems in the thread.
Acctually, the program cant delete itself when open, so you might need to open another program to handle the deleting, and editing and any other crap.
Quote Originally Posted by mnpeepno2 View Post
Acctually, the program cant delete itself when open, so you might need to open another program to handle the deleting, and editing and any other crap.
That is what I wrote + take a look at my example code...
Posts 1–15 of 18 · Page 1 of 2
This thread is closed for replies.

Tags for this Thread

None

Talk with us