diff --git a/.gitignore b/.gitignore
index c16d00737..c0f723cee 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,2 +1,4 @@
wappalyzer-chrome.zip
wappalyzer-firefox.xpi
+.windows_zip/*
+!.windows_zip/Download 7-Zip.hta
\ No newline at end of file
diff --git a/.windows_zip/7-zip.chm b/.windows_zip/7-zip.chm
deleted file mode 100644
index 08e4df235..000000000
Binary files a/.windows_zip/7-zip.chm and /dev/null differ
diff --git a/.windows_zip/7z920 source code.tar.bz2 b/.windows_zip/7z920 source code.tar.bz2
deleted file mode 100644
index f334696a2..000000000
Binary files a/.windows_zip/7z920 source code.tar.bz2 and /dev/null differ
diff --git a/.windows_zip/7za.exe b/.windows_zip/7za.exe
deleted file mode 100644
index 7f6bf86bc..000000000
Binary files a/.windows_zip/7za.exe and /dev/null differ
diff --git a/.windows_zip/Download 7-Zip.hta b/.windows_zip/Download 7-Zip.hta
new file mode 100644
index 000000000..efce3d8e1
--- /dev/null
+++ b/.windows_zip/Download 7-Zip.hta
@@ -0,0 +1,75 @@
+
Download 7-zip (command line version)
The download will be started automatically.
Place the file in the same folder as Wappalyzer.
License | Source code
+
+
+
\ No newline at end of file
diff --git a/.windows_zip/license.txt b/.windows_zip/license.txt
deleted file mode 100644
index 530ff3684..000000000
--- a/.windows_zip/license.txt
+++ /dev/null
@@ -1,29 +0,0 @@
- 7-Zip Command line version
- ~~~~~~~~~~~~~~~~~~~~~~~~~~
- License for use and distribution
- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-
- 7-Zip Copyright (C) 1999-2010 Igor Pavlov.
-
- 7za.exe is distributed under the GNU LGPL license
-
- Notes:
- You can use 7-Zip on any computer, including a computer in a commercial
- organization. You don't need to register or pay for 7-Zip.
-
-
- GNU LGPL information
- --------------------
-
- This library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Lesser General Public
- License as published by the Free Software Foundation; either
- version 2.1 of the License, or (at your option) any later version.
-
- This library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Lesser General Public License for more details.
-
- You can receive a copy of the GNU Lesser General Public License from
- http://www.gnu.org/
diff --git a/.windows_zip/readme.txt b/.windows_zip/readme.txt
deleted file mode 100644
index 9ae4222fe..000000000
--- a/.windows_zip/readme.txt
+++ /dev/null
@@ -1,41 +0,0 @@
-7-Zip Command line version 9.20
--------------------------------
-
-7-Zip is a file archiver with high compression ratio.
-7za.exe is a standalone command line version of 7-Zip.
-
-7-Zip Copyright (C) 1999-2010 Igor Pavlov.
-
-Features of 7za.exe:
- - High compression ratio in new 7z format
- - Supported formats:
- - Packing / unpacking: 7z, xz, ZIP, GZIP, BZIP2 and TAR
- - Unpacking only: Z, lzma
- - Highest compression ratio for ZIP and GZIP formats.
- - Fast compression and decompression
- - Strong AES-256 encryption in 7z and ZIP formats.
-
-7za.exe is a free software distributed under the GNU LGPL.
-Read license.txt for more information.
-
-Source code of 7za.exe and 7-Zip can be found at
-http://www.7-zip.org/
-
-7za.exe can work in Windows 95/98/ME/NT/2000/2003/2008/XP/Vista/7.
-
-There is also port of 7za.exe for POSIX systems like Unix (Linux, Solaris, OpenBSD,
-FreeBSD, Cygwin, AIX, ...), MacOS X and BeOS:
-
-http://p7zip.sourceforge.net/
-
-
- This distributive packet contains the following files:
-
- 7za.exe - 7-Zip standalone command line version.
- readme.txt - This file.
- license.txt - License information.
- 7-zip.chm - User's Manual in HTML Help format.
-
-
----
-End of document
diff --git a/package.cmd b/package.cmd
index b3d3f9b40..76b368785 100644
--- a/package.cmd
+++ b/package.cmd
@@ -8,6 +8,16 @@
:: THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
@echo off
+::Detect HTA host
+if exist %windir%\SysWOW64\mshta.exe goto hta64
+if exist %windir%\System32\mshta.exe goto hta32
+:hta32
+set hta=%windir%\System32\mshta.exe
+:hta64
+set hta=%windir%\SysWOW64\mshta.exe
+goto endDetection
+:endDetection
+
::Links
call links.cmd
@@ -15,6 +25,13 @@ call links.cmd
if exist wappalyzer-chrome.zip del wappalyzer-chrome.zip
if exist wappalyzer-firefox.xpi del wappalyzer-firefox.xpi
+
+::Prompt to download 7-Zip if necessary
+set dl7zfile=.windows_zip\Download 7-Zip.hta
+:retry
+if not exist .windows_zip\7za.exe cd .windows_zip&%hta% "%cd%\%dl7zfile%"&cd ..&goto retry
+
+
::Pack Chrome extension
cd drivers\chrome&&..\..\.windows_zip\7za.exe a -tzip -mx9 ..\..\wappalyzer-chrome.zip *
cd..\..
@@ -24,5 +41,5 @@ cd drivers\firefox&&..\..\.windows_zip\7za.exe a -tzip -mx9 ..\..\wappalyzer-fir
cd..\..
-
+:end
@echo on
\ No newline at end of file