forum.vdsworld.com Forum Index forum.vdsworld.com
Visit VDSWORLD.com
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 


Update software question [SOLVED]

 
Post new topic   Reply to topic    forum.vdsworld.com Forum Index -> General Help
View previous topic :: View next topic  
Author Message
Tdk161
Valued Contributor
Valued Contributor


Joined: 08 Feb 2005
Posts: 399
Location: ITALY

PostPosted: Tue May 03, 2011 10:34 pm    Post subject: Update software question [SOLVED] Reply with quote

Hi,
I need to create a procedure to check on internet if an update my software is present and if yes download it
It Is possible ? How'?

Many tnx


Last edited by Tdk161 on Wed May 04, 2011 3:56 am; edited 1 time in total
Back to top
View user's profile Send private message Send e-mail
Claz
Newbie


Joined: 03 Jan 2009
Posts: 23
Location: The Netherlands

PostPosted: Tue May 03, 2011 11:07 pm    Post subject: Reply with quote

Yep, it's possible.
I used it for a Dutch application.

I will post the update code here a.s.a.p., but need to translate it into English first.

Might take a few days... it's quite small, but I'm a bit busy...
Back to top
View user's profile Send private message
LiquidCode
Moderator Team


Joined: 05 Dec 2000
Posts: 1751
Location: Space and Time

PostPosted: Wed May 04, 2011 12:19 am    Post subject: Reply with quote

I do that with save-it. I have an ini file on my public dropbox account that have the latest version of my app. I have my app download that ini file and check against the ver of the exe. If it is higher than the exe, then I download a new setup and run it.

I'll post my code in a bit.

_________________
Chris
Http://theblindhouse.com
Back to top
View user's profile Send private message Send e-mail Visit poster's website
LiquidCode
Moderator Team


Joined: 05 Dec 2000
Posts: 1751
Location: Space and Time

PostPosted: Wed May 04, 2011 12:28 am    Post subject: Reply with quote

here is my code. if you use vds 5 you will have to change it to use a dll like vdsinet.dll

Code:

  Title Save-It Update
 
  if @equal(%1,/Silent)
     Goto Silent
  end
 
  DIALOG CREATE,Save-It Update,-1,0,240,55,NOSYS
REM *** Modified by Dialog Designer on 5/1/2011 - 10:09 ***
  DIALOG ADD,TEXT,pw,22,79,,,Please Wait...
  DIALOG SHOW

  File copy,"<your url>\yourini.ini",@path(%0)update.ini
  if @ok()
     inifile open,@path(%0)update.ini
     %%ver = @iniread(Settings,Version)
     if @greater(%%ver,@verinfo(@path(%0)Save-It.exe,V))
        if @ask(There is a new version available. Would you like to download and install it?)
           Dialog set,pw,Downloading...
           file copy,"<url to setup file>",@windir(T)\Save-It Setup.exe
           if @ok()
              if @winexists(#Save-It_Wnd)
                 Warn Save-It will be closed for update. Please finish and close Save-It then press OK to continue and follow the screens.
                 Window close,#Save-It_Wnd
              end
              File delete,@path(%0)update.ini
              Run @windir(T)\Save-It Setup.exe
              stop
           end
        end
     else
        Info You have the current version.
        File delete,@path(%0)update.ini
     end
  Else
     Warn Unable to check for new version.
  end
  File delete,@path(%0)update.ini
  stop
 
:Silent
  File copy,"<your url>\yourini.ini",@path(%0)update.ini
  if @ok()
     inifile open,@path(%0)update.ini
     %%ver = @iniread(Settings,Version)
     inifile close
     if @greater(%%ver,@verinfo(@path(%0)Save-It.exe,V))
        inifile open,@path(%0)Save-It.ini
        inifile write,Update,Version,%%Ver
        inifile close
     end
  end
  File delete,@path(%0)update.ini
  stop

_________________
Chris
Http://theblindhouse.com
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Tdk161
Valued Contributor
Valued Contributor


Joined: 08 Feb 2005
Posts: 399
Location: ITALY

PostPosted: Wed May 04, 2011 2:04 am    Post subject: Reply with quote

Hi LiquidCode Very Happy
Thank you very much for your code, It will be very usefull for me Thumbs Up

Only one answer:

<url to setup file> can be like this <www.mysyte.com\Mysetup.exe> ?

Thank you a lot again
Back to top
View user's profile Send private message Send e-mail
LiquidCode
Moderator Team


Joined: 05 Dec 2000
Posts: 1751
Location: Space and Time

PostPosted: Wed May 04, 2011 3:02 am    Post subject: Reply with quote

Yes. But to be safe use the http:// in front. So it would be something like:

File copy, http://www.Mysore.com/mysetup.exe,mysetup.exe

The bottom code in :silent is just to write to an ini file so the main program knows there is an update. I did not include the update code into the main program because the main program is in VDS 5 and that cannot use URLs in file copy.

_________________
Chris
Http://theblindhouse.com
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Tdk161
Valued Contributor
Valued Contributor


Joined: 08 Feb 2005
Posts: 399
Location: ITALY

PostPosted: Wed May 04, 2011 3:58 am    Post subject: Reply with quote

Thank a lot LiquidCode

Work fine Smile


Byez
Back to top
View user's profile Send private message Send e-mail
Display posts from previous:   
Post new topic   Reply to topic    forum.vdsworld.com Forum Index -> General Help All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You can attach files in this forum
You can download files in this forum

Twitter@vdsworld       RSS

Powered by phpBB © 2001, 2005 phpBB Group