1.
1.1
2.
4
3.
http://sbautoupdater.npage.de/get_file.php?id=24521039&vnr=428469
4.
5.
C:\\AutoUpdater - Test\\Test2.txt
6.
PD \\AutoUpdater - Test\\Test1.txt
UpdaterStart()
Sub
UpdaterStart
AutoUpdaterVersion =
"1.0"
ProgramVersion = 1.0
'This is the version of the program you want to update.
CheckLink =
"http://sbautoupdater.npage.de/get_file.php?id=24521039&vnr=428469"
'The downloadlink for the checkfile (which contains all needed information) IMPORATANT: Never change the link of the checkfile. Otherwise the program won't work!!!
CheckFileDestination = Program.Directory +
"\\Note Program.txt"
'The place where the checkfile gets copied to.
Programm()
EndSub
UpdateDone
For
o = 1
To
5
UpdateDoneSpace[o] = Text.GetCharacter(10)
TextWindow.WriteLine(UpdateDoneSpace[o])
EndFor
TextWindow.WriteLine(
"The update is done!"
)
TextWindow.Write(
"Your new version is "
TextWindow.ForegroundColor =
"Red"
TextWindow.Write(File.ReadLine(CheckFileDestination, 1))
"Gray"
"."
11
File.DeleteFile(CheckFileDestination)
'File.WriteLine(Program.Directory + "\\YourNewTextfile.txt", 1, "1") 'This line is only needed if you want to use the AutoUpdater as a seperate program.
Program.Delay(5000)
'Only for the user. It is not necessary.
Program.
End
()
StartUpdater
If
File.ReadLine(Program.Directory +
"\\YourNewTextfile.txt"
, 1) = 0
Then
LDProcess.Start(Program.Directory +
"\\TheNewProgramsName.exe"
,
""
ElseIf
, 1) = 1
TheStartSubroutineOfYourProgram()
EndIf
TheStartSubroutineOfYourProgram
File.WriteLine(Program.Directory +
, 1,
"0"
'Your programs code
Maheshkumar S Tiwari edited Revision 5. Comment: minor edit
Maheshkumar S Tiwari edited Revision 4. Comment: Added tags
Timo Sö edited Revision 3. Comment: Deleted an unneeded sentence
Well written article and useful - I look forward to the next one...
Very nice article! Comprehensive but simple enough for a beginner to follow.