NSIS - download and decompress zip file from the internet
Asked Answered
T

2

9

I would like to create NSIS installer that during the installation process checks on the www whether there is a newer application version (number). If in the network exists newer version than version provided witch installer, the installer should to download application zip file, unpack it and install the downloaded application instead of application provided with installer.

The questions are:

  • how to download file from the internet (www)?
  • how to unzip downloaded zip file?
Treasonable answered 17/11, 2010 at 17:41 Comment(0)
A
9

As an addendum to Stu's answer, it's really important to point out that ZipDLL, while a great plug-in, is released under the GPL. If you're releasing a commercial product, you can't legally include it with your product. Additionally, the only available copy requires that you modify the source, which engages the "modification" sections of the GPL.

Nsisunz is released under an extremely open license -- just include the license text shown on the source page to distribute it, and make sure to mark any direct modification in source.

Actable answered 27/10, 2011 at 0:14 Comment(0)
M
4

A bit late to the party, but now (with the new Windows) there are a lot of useful functions in the PowerShell. One of them does the no-hassle uncompression of the .zip files. The only downside (for me, at least) is that it is not possible to avoid extracting the directory structure (flatten out the files). Otherwise it is easy:

powershell.exe Expand-Archive <filename> <target_dir>
Martins answered 4/9, 2018 at 8:37 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.