View previous topic :: View next topic |
Author |
Message |
Tdk161 Valued Contributor
Joined: 08 Feb 2005 Posts: 399 Location: ITALY
|
Posted: Tue May 03, 2011 10:34 pm Post subject: Update software question [SOLVED] |
|
|
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 |
|
|
Claz Newbie
Joined: 03 Jan 2009 Posts: 23 Location: The Netherlands
|
Posted: Tue May 03, 2011 11:07 pm Post subject: |
|
|
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 |
|
|
LiquidCode Moderator Team
Joined: 05 Dec 2000 Posts: 1751 Location: Space and Time
|
Posted: Wed May 04, 2011 12:19 am Post subject: |
|
|
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 |
|
|
LiquidCode Moderator Team
Joined: 05 Dec 2000 Posts: 1751 Location: Space and Time
|
Posted: Wed May 04, 2011 12:28 am Post subject: |
|
|
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 |
|
|
Tdk161 Valued Contributor
Joined: 08 Feb 2005 Posts: 399 Location: ITALY
|
Posted: Wed May 04, 2011 2:04 am Post subject: |
|
|
Hi LiquidCode
Thank you very much for your code, It will be very usefull for me
Only one answer:
<url to setup file> can be like this <www.mysyte.com\Mysetup.exe> ?
Thank you a lot again |
|
Back to top |
|
|
LiquidCode Moderator Team
Joined: 05 Dec 2000 Posts: 1751 Location: Space and Time
|
Posted: Wed May 04, 2011 3:02 am Post subject: |
|
|
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 |
|
|
Tdk161 Valued Contributor
Joined: 08 Feb 2005 Posts: 399 Location: ITALY
|
Posted: Wed May 04, 2011 3:58 am Post subject: |
|
|
Thank a lot LiquidCode
Work fine
Byez |
|
Back to top |
|
|
|
|
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
|
|