Sign in to follow this  
Followers 0
yucatan

versions

12 posts in this topic

hi i have a server and a client and the server send the version but i wanne make a update script that when a older client connect he get a auto update i already got a system for the versions but i dont know how to build the update himself somebody got sample's or ideas?

Share this post


Link to post
Share on other sites



Say you have "script.exe" and your update can be "scriptup.exe". From "script.exe", download "scriptup.exe", then create a batch file that deletes "script.exe" and renames "scriptup.exe" to "script.exe". Then run the batch file and end the first process. There's your update.

Share this post


Link to post
Share on other sites

I made a simple update script that ran on the client side. It looked at the version info in the file on the client, and then looked at the file on the server. If the server was newer, it would download and overwrite the one on the client.

Take a look at FileGetVersion.

Share this post


Link to post
Share on other sites

Hi all,

Here's my problem with versions & updates

I have a central location (UNC share) where I store a the latest version of a script. Let's call it "Latest.exe".

This file is then distributed to the users so they use the script on their machines.

I make modifications in "Latest.exe" every few weeks and I'd like for my users to be notified (i.e MsgBox) that the version they are running in their machines is no loger the latest after comparing their version against the one in the central location.

Whenever I compile my scripts into "exe" the version of the file is automatically set to the AutoIT's version. For instace 3.2.10.0, so when I use FileGetVersion both, the "NoLongerTheLatest.exe" and "Latest.exe" return the same version.

How do I do to set the file version properties when compiling scripts? Is there any directive of function I'm missing here? How can I solve this "check if running latest version" problem.

Thanks!!


Why crabs don't give money to charity..... because they are shell-fish!! PS: Don't be a crab and share your scripts with the community! ;-)

Share this post


Link to post
Share on other sites

Bump!


Why crabs don't give money to charity..... because they are shell-fish!! PS: Don't be a crab and share your scripts with the community! ;-)

Share this post


Link to post
Share on other sites

#6 ·  Posted (edited)

You can put your own version numbers into your scripts by using the autoit wrappers. This way it won't show up the generic autoit version but the version you specified for your script. You could also compare dates of the script and replace the newer of the two.

#AutoIt3Wrapper_Res_Fileversion=1.0.0.0

I believe you need reshacker. This is all documented in the SCITE help file.

Edited by SoulA

Share this post


Link to post
Share on other sites

What I did is I have a version number in the script, it reads an .ini file and compares the numbers. If the numbers aren't the same it closes the program and runs update.exe. Which replaces the old file(s) with the new, updates the shortcuts on the desktops, and so on. Both the version.ini and update.exe are on the server so I can update the update.exe and then the .ini.


Giggity

Share this post


Link to post
Share on other sites

I am also attempting to use the wrapper. I am afraid its use is not as intuitive as I might have hoped. I downloaded AutoIt3Wrapper and AutoIt3Wrapper_GUI and ran the GUI. I select the script and enter version information, but then it opens Aut2Exe where it just compiles the script as though AutoIt3Wrapper never happened. What are the steps to using the Wrapper?

Many thanks for some direction.

Michael

Share this post


Link to post
Share on other sites

#10 ·  Posted (edited)

Did you check the version info of the .exe after you ran the compiler with options? Are you sure the values you entered were not changed at all after compilation?

Also it is important to make sure you downloaded reshacker.exe and put it in your autoitwrapper folder.

Edited by SoulA

Share this post


Link to post
Share on other sites

Thanks for responding.

Yes, I have ResHacker.exe (and its support files) along with AutoIt3Wrapper and GUI in the same folder. I double checked and it is not modifying the version info. It seems to start right, allowing me to enter version info, etc. but then just reverts to the old Aut2Exe. I'm scratching my head on this one, yet I would like to figure it out as my GUI and support programs will change often and I want to use FileGetVersion.

Anything else I might check or be aware of? Many thanks.

Mike

Did you check the version info of the .exe after you ran the compiler with options? Are you sure the values you entered were not changed at all after compilation?

Also it is important to make sure you downloaded reshacker.exe and put it in your autoitwrapper folder.

Share this post


Link to post
Share on other sites

1: Are you using SciTE to compile your programs? It makes for a far easier environment to code in. See the second tab across in CTRL-F7, etc as an option to update your version number, etc.

2: More efficient way: Put these compiler directives commands (click here to see them all - but only use the ones you need) at the top of your code before you compile:

#Region AutoIt3Wrapper directives section

#AutoIt3Wrapper_Res_Fileversion=1.23.45.6 ;<<=put the appropriate program version number here.

#EndRegion

See http://www.autoitscript.com/autoit3/scite/...oIt3Wrapper.htm for a more detailed explanation of what can be done with the wrapper directives - very powerful.

3: Alternatively, try storing the existing ini file as a FileInstall within your program, updating the version number manually inside it each time your program changes before you compile it, write out the fileinstalled version when your program runs, and then download the latest ini file from your server to another file name and read and compare the contents of the two for changed version number values. If different, update from the server to another file name and run that one. If not, proceed as normal, but don't forget to remove both ini files and copy the updated file over the top of the old one at program completion as part of tidying up.

This way you only download a few bytes for the ini file each time the program is run, and you then only have to download and run the larger program exe file when necessary.

Hint: When you place the new file on the server, update the ini file there afterwards so users don't download the older exe version by mistake while you are still in the process of updating your server.

Just having to download the smaller ini file first saves on bandwidth and improves response times, especially if it is done when the program is first starting up -- the users are always an impatient bunch and bandwidth is never free!

4: Make sure you have the latest version of the production and beta AutoIT, SciTE, and all the corresponding tools (they have just got updated the other day). You may have to un-install and re-install to ensure you have everything kosher.

Let us know how you went. Sample code you post is always useful for ideas for others.

Share this post


Link to post
Share on other sites

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 account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0