CKV Self-Extractor

From NSIS Wiki

Author: TrueparuEx (talk, contrib)


Links Broken

Exe.gif ckvse.exe (149 KB)
Zip.gif (143 KB) (143 KB) (alternative)
Development Versions


Version: 0.14c.

ckv Self-Extractor Kit is a collection of scripts and custom user interfaces to create self-extracting files with NSIS. This is way simpler built than NSIS Self-Extractor kit for a lighter interface. This also includes a wizard for the easy creation of self-installers. This also can:

  • Open the extration directory and/or read-me at end.
  • Show the license before the extraction occurs.
  • choose from 1 of 3 UI's available: default, tiny and simple.

This is still under development.

How To Use

Simplest way to use ckv Self-Extractor is to include ckvse.nsh in to beginning of any existing NSIS script file, replace first Section with ${FileExtraction}, and use the commands as said in the documentation (included with zip file).

However this way you only get NSIS installer with Self-Extractor look. Better idea is to use the ckv Self-Extractor wizard (ckvsewizard.exe) that can create Self-Extractor from a directory or zip file.

Example Script

!include "ckvse.nsh"
SetCompressor lzma
!insertmacro ProductName "My product"
!insertmacro OutFileName "outfile.exe"
!insertmacro ExtractDir "C:\Sample"
!insertmacro IconFile "C:\my\file\source\icon.ico"
!insertmacro OpenDirFunc "off" 1
!insertmacro OwprompFunc "on" 1
!insertmacro OpenReadme "off" 1 "$INSTDIR\readme.txt"
!insertmacro ShowLicense "C:\my\file\source\license.txt" "off"
!insertmacro SetUI "default"
  SetOutPath "$INSTDIR"
  !insertmacro EXTRACT_FILE "C:\my\file\source\" "readme.txt"
  !insertmacro EXTRACT_FILE "C:\my\file\source\" "license.txt"
  !insertmacro EXTRACT_FILE "C:\my\file\source\" "product.exe"
  SetOutPath "$INSTDIR\subdir"
  !insertmacro EXTRACT_FILE "C:\my\file\source\" "data.dat"
  !insertmacro EXTRACT_FILE "C:\my\file\source\" "more_data.dat"
Personal tools