krikor Posted December 16, 2004 Share Posted December 16, 2004 Hi, I was wandering if we can create an autimatic sofware updater with AutoIt, that will check the make of the software then check on a website if there is a newer version then download and install it transparently or just a message saying it's done. Thanks Greg Link to comment Share on other sites More sharing options...
Doxie Posted December 16, 2004 Share Posted December 16, 2004 Do you actually belive its that frekvent update of AutoIt? Maybe it is... I use the same version for several month. Before i even look for new version. As long as its working, don´t try to fix it Were ever i lay my script is my home... Link to comment Share on other sites More sharing options...
MHz Posted December 16, 2004 Share Posted December 16, 2004 An updater could break your scripts, leaving you lost. Better off choosing to upgrade fully when you choose to do so, knowing fully of what can happen, with the change logs to go with it. CSV updating is perhaps good for some programs, but program languages, recipe for disaster. My thoughts anyway. Thanks for the idea, Jon has tried it. Link to comment Share on other sites More sharing options...
Blue_Drache Posted December 16, 2004 Share Posted December 16, 2004 I think he's asking if it's possible to write an updating function into an AutoIt script. If a newer version exists, install the new version. I could flowchart the idea I have, but it involves having the version number in a specific format after the name of the .EXE. File list on network server: Prog1-0.exe prog1-1.exe prog2-0.exe prog2-5.exe Let's say 2.5 is the newest version. The code would get the file name(s) in the network folder and compare the format of the numbers with a $new = stringsplit(stringtrimleft(getfilename("directory"),4),"-") or whatever.... with a $old = stringsplit($version,"-") variable inside the code. Test if $new > $old then filecopy the new version, run the new one, and exit the old one. Pop up a message box to ask the user to hit "OK" and the new version copies itself as the old one's filename.... Ok, maybe it wasn't simple.... but that's what popped in my head. Was this what you wanted? Lofting the cyberwinds on teknoleather wings, I am...The Blue Drache Link to comment Share on other sites More sharing options...
krikor Posted December 17, 2004 Author Share Posted December 17, 2004 I think he's asking if it's possible to write an updating function into an AutoIt script. If a newer version exists, install the new version. I could flowchart the idea I have, but it involves having the version number in a specific format after the name of the .EXE. File list on network server: Prog1-0.exe prog1-1.exe prog2-0.exe prog2-5.exeLet's say 2.5 is the newest version. The code would get the file name(s) in the network folder and compare the format of the numbers with a $new = stringsplit(stringtrimleft(getfilename("directory"),4),"-") or whatever.... with a $old = stringsplit($version,"-") variable inside the code. Test if $new > $old then filecopy the new version, run the new one, and exit the old one. Pop up a message box to ask the user to hit "OK" and the new version copies itself as the old one's filename....Ok, maybe it wasn't simple.... but that's what popped in my head. Was this what you wanted?<{POST_SNAPBACK}>Yes it's almost this.I'm a business application programmer, the apps run on locally on users' computer, the data is on a server in a network or Internet. The apps undergo substantial changes. The data is modified subsequently but the we got to deploy the apps all over before they touch the data in order to make them run transparently and flowlessly, so we gotta check and see if there's a new version, if yes, replace the exe or the dll with the new one from the network or the Internet.The versions can be checked from an ini file too. even if the ini file is destroyed it will just crash the existing one. It's all this manipulation and integrating this manipulation in the app that I'm thinking about.What I would like to do is something like Nortons LiveUpdate or something like that of Microsofs Automatic Updater.Is it possible with a script or a hard coded program is better? Will the script give a faster and more secure way of dialoging over the Internet with the server?ThanksGreg Link to comment Share on other sites More sharing options...
Helge Posted December 17, 2004 Share Posted December 17, 2004 If the program you want to update is created by yourself you can place a INI-file on thewebserver with information on the newest version of your program.Example :[MYPROG] DATE=20041231100000 INFO=Fixed some bugs VERSION=1.32 FILE=http://www.myserver.com/dir/file.exeThe script could check if the INI-date is a higher value then the current running release-date,and if it is it higher it will prompt the INFO, and ask if the user want to download...or it could be set to automatically download the file.Steps :1. Download INI.2. Read DATE-value.3. Check INI-value > CURRENT4. Download !If the program isn`t made by yourself (or anyone you know) then it could be pretty hardto make a stable and working updater... Good luck BTW !- Helge - Link to comment Share on other sites More sharing options...
krikor Posted December 17, 2004 Author Share Posted December 17, 2004 If the program you want to update is created by yourself you can place a INI-file on thewebserver with information on the newest version of your program.Example :[MYPROG] DATE=20041231100000 INFO=Fixed some bugs VERSION=1.32 FILE=http://www.myserver.com/dir/file.exeThe script could check if the INI-date is a higher value then the current running release-date,and if it is it higher it will prompt the INFO, and ask if the user want to download...or it could be set to automatically download the file.Steps :1. Download INI.2. Read DATE-value.3. Check INI-value > CURRENT4. Download !If the program isn`t made by yourself (or anyone you know) then it could be pretty hardto make a stable and working updater... Good luck BTW !- Helge -<{POST_SNAPBACK}>Hi Helge,Yes the program is written by me, however I didn't get the abreviations, I know the steps are exactly as you describe. Being a newbie I thought we could instead of downloading, read the .ini file direct on the server (if it goes faster), what I don't know is the syntax and the steps to follow: to read, download to Temp if ok, close the exe, overwrite it then re-run it.ThanksK Link to comment Share on other sites More sharing options...
krikor Posted December 17, 2004 Author Share Posted December 17, 2004 Hi Helge,Yes the program is written by me, however I didn't get the abreviations, I know the steps are exactly as you describe. Being a newbie I thought we could instead of downloading, read the .ini file direct on the server (if it goes faster), what I don't know is the syntax and the steps to follow: to read, download to Temp if ok, close the exe, overwrite it then re-run it.ThanksK<{POST_SNAPBACK}>Also, Where do we get a list of the APIs such as "GetAsyncKeyState"?ThanksK Link to comment Share on other sites More sharing options...
Helge Posted December 17, 2004 Share Posted December 17, 2004 Check out AllApi.net.. Link to comment Share on other sites More sharing options...
Helge Posted December 17, 2004 Share Posted December 17, 2004 I was thinking of creating an internet-updater for a program I`m making, and I can probably give you the source for it in a couple of weeks.. - Helge - Link to comment Share on other sites More sharing options...
Fossil Rock Posted December 29, 2005 Share Posted December 29, 2005 I would be interested in something like this too. Agreement is not necessary - thinking for one's self is! Link to comment Share on other sites More sharing options...
seandisanti Posted December 29, 2005 Share Posted December 29, 2005 I was thinking of creating an internet-updater for a program I`m making,and I can probably give you the source for it in a couple of weeks..- Helge -it's been done before guys, there are examples on the forum... i'll make another one real quick and post it... Link to comment Share on other sites More sharing options...
Moderators SmOke_N Posted December 29, 2005 Moderators Share Posted December 29, 2005 it's been done before guys, there are examples on the forum... i'll make another one real quick and post it...Can you make me a ham sandwich while your at it Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer. Link to comment Share on other sites More sharing options...
herewasplato Posted December 29, 2005 Share Posted December 29, 2005 Can you make me a ham sandwich while your at it w/ smoked ham no less :-) [size="1"][font="Arial"].[u].[/u][/font][/size] Link to comment Share on other sites More sharing options...
seandisanti Posted December 30, 2005 Share Posted December 30, 2005 w/ smoked ham no less :-)actually i got pulled away on real work so i can't tackle this one right this second. but if you two aren't too busy smoking each other's hams, maybe one of you could post (or link to) an example Link to comment Share on other sites More sharing options...
Moderators SmOke_N Posted December 30, 2005 Moderators Share Posted December 30, 2005 Actually if I'm not mistaken, AutoIt has an update example within it folder somewhere. That would probably be the best example. Where mine is: Program Files\AutoIt3\Extras\AutoUpdateIt it's in .au3, so you may be able to get some ideas there. Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer. Link to comment Share on other sites More sharing options...
herewasplato Posted December 30, 2005 Share Posted December 30, 2005 ...maybe one of you could post (or link to) an exampleI had the post/reply window open and was searching in another window for a post that I thought covered this very thing. I never found the post and was called to eat... so I posted the one line that I had written. :-)(You can see where my priorities are!)I still cannot find the post that I was searching for (hate when that happens)...So run with SmOke_N's example.postcount + 1 [size="1"][font="Arial"].[u].[/u][/font][/size] Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now