What you need

For this script to run properly on your system here is what you need.
  • Windows XP / Vista / 7 / 8 / 10 / 2003 / 2008 / 2008 R2 / 2012
  • Powershell 2.0+ available here
  • 7zip 9.20 (or newest) by Igor Pavlov available here. Choose either 32 or 64bit version according to your system's architecture.
If you're running Windows XP or Windows 2000/2003 you also need
  • SysInternals Junction Tool available here

Install SysInternals Junction Tool

SysInternals Junction Tool does not have a setup package: it gets delivered as a single compressed archive (.zip): by the means of this documentation I will assume you have extracted the binary into

or, if you're running a 64bit system, into

"%programfiles% (x86)\SysInternalsSuite\"

Check everyting is ok


Of course if you mean to run this script you must be on a Windows computer. I assume you already know which flavour of Windows you're running on and have already checked it's on the list depicted on top of this page.
Now let's go ahead and look Powershell's is at least version 2. To do this you must open a PowerShell session window by finding the appropriate launcher icon in your Start menu. If you can't find it then simply open a command window using Start -> Run and entering cmd in the input field. Press enter and in the command window simpy type:
C:\ > powershell and press Enter
This will load the Powershell environment which will display this banner info:
Windows PowerShell
Copyright (C) 2012 Microsoft Corporation. All rights reserved.

PS C:\ >

Notice that the prompt now has "PS" prefix. To check which version of PowerShell you're on simply type:
PS C:\ > $Host.Version.Major and press Enter
If it returns a value equal (or greater) than 2 then you're ok. You can now close Powershell (and optionally command window) by typing Exit (followed by Enter) as many times it takes to close all the open propmpt windows.

7zip 9.20 (or better)

If you have downloaded and installed 7zip with the default settings then you'll find the executable 7z.exe into "%programfiles%\7-Zip". To check it's working open a command window (Start->Run cmd) and, at command prompt type:
You should receive this output
7-Zip [64] 9.20  Copyright (c) 1999-2010 Igor Pavlov  2010-11-18

Usage: 7z <command> [<switches>...] <archive_name> [<file_names>...]

  a: Add files to archive
  b: Benchmark
  d: Delete files from archive
  e: Extract files from archive (without using directory names)
  l: List contents of archive
  t: Test integrity of archive
  u: Update files to archive
  x: eXtract files with full paths
  -ai[r[-|0]]{@listfile|!wildcard}: Include archives
  -ax[r[-|0]]{@listfile|!wildcard}: eXclude archives
  -bd: Disable percentage indicator
  -i[r[-|0]]{@listfile|!wildcard}: Include filenames
  -m{Parameters}: set compression Method
  -o{Directory}: set Output directory
  -p{Password}: set Password
  -r[-|0]: Recurse subdirectories
  -scs{UTF-8 | WIN | DOS}: set charset for list files
  -sfx[{name}]: Create SFX archive
  -si[{name}]: read data from stdin
  -slt: show technical information for l (List) command
  -so: write data to stdout
  -ssc[-]: set sensitive case mode
  -ssw: compress shared files
  -t{Type}: Set type of archive
  -u[-][p#][q#][r#][x#][y#][z#][!newArchiveName]: Update options
  -v{Size}[b|k|m|g]: Create volumes
  -w[{path}]: assign Work directory. Empty path means a temporary directory
  -x[r[-|0]]]{@listfile|!wildcard}: eXclude filenames
  -y: assume Yes on all queries

If you can see this you're ok with 7zip. Close any command prompt by typing exit followed by enter.

Junction Tool

If you're on Windows XP or Window 2000 you need to have SysInternals Junction Tool installed. I have explained earlier how to get it and where to place it. To test it's working do the following. Open a command prompt window (Start->Run cmd) and type :
"%programfiles%\SysInternalsSuite\Junction.exe" /accepteula and press Enter
You shoud receive a prompt like this
Junction v1.05 - Windows junction creator and reparse point viewer
Copyright (C) 2000-2007 Mark Russinovich
Systems Internals - http://www.sysinternals.com

The first usage is for displaying reparse point information, and the
second usage is for creating or deleting a NTFS junction point:

usage: C:\Program Files\SysinternalsSuite\junction.exe [-s] [-q] <file or directory>
       -q     Don't print error messages (quiet)

       -s     Recurse subdirectories

usage: C:\Program Files\SysinternalsSuite\junction.exe [-d] <junction directory> [<junction target>]
       -d     Delete the specified junction
       example: junction d:\link c:\winnt

If you see this you're ok with Junction. Close any command prompt by typing exit followed by enter.

Last edited Dec 12, 2015 at 8:13 AM by Anlan, version 22