Check Version

Please share your functions/code-snips

Check Version

Postby Danerd100 » Fri Aug 08, 2008 7:01 pm

Okay, I have developed a version checker to make sure the version of your program is up-to-date

First, you must have a config file with preferably this code

Code: Select all
<CURRENTVERSION>x.x.x.x</CURRENTVERSION>
save it as c:\Config.ini

then, you must have a website (or just one page) with just the version number an example is mine: http://danerd.freehostia.com/Version%20Number.ini

you then insert this code:

Code: Select all
Dim UptodateVersion as string = Application.LoadURLAsString("yoursite.com/Version%20Number.ini")
  dim ConfigFile As String = file.readtext(c:\Config.ini")
  dim CurVerS as integer = instr(1, ConfigFile, "<CURRENTVERSION>") + 16
  dim CurVerE as integer = instr(1, configFile, "</CURRENTVERSION>")
  dim CurVer as string = mid(ConfigFile, CurVerS, CurVerE - CurVerS)
if CurVer <> UpToDateVersion then
msgbox ("Version " & uptodateversion & " is now available, please download it.")
end if
Last edited by Danerd100 on Tue Aug 12, 2008 2:25 pm, edited 2 times in total.
Danerd100
 
Posts: 76
Joined: Sun Dec 23, 2007 1:26 am

Re: Check Version

Postby berndnoetscher » Mon Aug 11, 2008 10:15 am

Thanks for sharing your code. :D
berndnoetscher
Site Admin
 
Posts: 1059
Joined: Tue Sep 25, 2007 9:37 am

Re: Check Version

Postby Danerd100 » Mon Aug 11, 2008 7:05 pm

If anyone knows of a better way of doing this (I might be taking a long way around or something) let me know
Danerd100
 
Posts: 76
Joined: Sun Dec 23, 2007 1:26 am


Return to User-Functions

cron