7 zip sfx not extracting package

110 views Asked by At

I am trying to create a self extracting package using 7 zip sfx. I have used 7zSD.sfx from LZMA sdk package.

Steps followed are:

  1. Created a .7z file using below approach
$FileLocation = "D:\Self Extracting\Package"
& .\7z.exe a archive.7z $FileLocation
  1. The above file location contains a config file and 7zSD.sfx file. Also, it contains a test batch file to echo "Hello World"

  2. Used below command line to create the archive package cmd /c 'copy /b 7zSD.sfx + config.txt + archive.7z archive.exe'

This generates the archive.exe file. Upon click of the file, it shows the message to extract files, however doesn't extract anything and shows the error message as "The system cannot find the file specified"

Config file I used is as below: ;!@Install@!UTF-8! RunProgram="DropIt.exe /s" InstallPath="%PROGRAMFILES%\test" ExtractTitle="Installing a program..." GUIMode="1" SelfDelete="1" ;!@InstallEnd@!

Can someone please guide me if I am doing something wrong here as this is not working as expected.

Expectation: The self extracting archive package should extract all files and folders and the specified bat file should be executed post extract.

0

There are 0 answers