Hello everyone,

I have automatic update process on my website.. that runs a check on our users current software versions.. to see if we have an update for them.
Being that our software has multiple modules to it.. and each module is updated idividually, I mark which module needs updated then dynamically create a zip file for them to download with the new files in it.

What I would like to do is instead of creating a zip.. create an executable zip.. this way would be much easier for our users because then they simply have to double click on the file or simply 'open' it from our website. And it would install to the correct places.. even if they just had to put a path in would be fine.

(90% of our users are not what you would call 'computer savvy')

So the more automation I can do for them the better.

So is this possible to create or no?

thanks for your suggestions,
eff

    This isn't something which any of the PHP zip libraries offer as far as I know, and a quick Google seems to verify this. What OS are you running PHP on?

    If you're on a Windows system, then Winzip has an extension that allows you to create zips from the command line, so you could exec out and create it. If you are on a Linux system, there is an exe (yes, an exe on Linux, but you're not installing anything from it) called unzipsfx that acts as a stub file which you can append the normal zip file to.

    Basically, an exe zip is just a regular zip file with the extractor exe at the beginning of the file, so you can grab the exe I mentioned above, and append your zip to it. That should work.

      yea i'm running on windows...

      how would I "exec out and create it."

      thanks,
      eff

        In your command line in Windows, use the Winzip command line tool and hash out the command you would use to create the exe zip file. Once you've got your one-line command, chuck it into a string and use it as the argument of a PHP exec() command. You will probably need to use absolute paths for the command and the files you are using and creating, as Windows has a funny habit of looking for, and putting things in the wrong place.

          thanks that is very helpful...

          j/w- could you possibly show me an example of something that would be typed into the command line.. I have no exp with using command line 'anything' except for commandline SQL databases.

          thanks,
          eff

            Unfortunately I don't run Windows (I upgraded to Linux a while back) so I wouldn't be able to help out with the Winzip command line syntax. I know that they have a help page which details how to download the extension and use it.

              well thanks a million Ashley, that was very helpful

                Write a Reply...