ipen

7z Self extracting

38 posts in this topic

Hi,

Well let me better explain :

"C:\Program Files\7-Zip\7z.exe" a %zipFileName% %allFromOutputDir%

copy /b "C:\Program Files\7-Zip\7zSD_LZMA.sfx" + config.txt + %zipFileName% %outputFile%

where :

%zipFileName% = "MySetup.7z"

%allFromOutputDir% = all of the items that currentlly exists in the output dir of the setup project. (bin\release\...)

%outputFile% = "MySFX.exe"

thats it...

Did not zip only one file but the whole setup dir - since the setup my contain more then just the ".exe".

It contains the pre- requisites folders (like the .net version and win intsller etc.).

That is not the issue.

I will try your format of command :

copy /-Y /B

0

Share this post


Link to post
Share on other sites

Hi,

tried both of the last suggestions....

Still same errors.

Could it be because my zip contains more then one file ?

See , the zip contains these items :

- MySetup.msi

- setup.exe

- "WindowsInstaller3_1" folder (pre - requisite)

-"DotNetFX35" folder (another pre-requisite)

Now - when i run my SFX on win XP - it does run the "setup.exe", but after checking for the pre-requisites , it fails to run the MSI !!!

Here is the log content :

The following properties have been set:

Property: [AdminUser] = true {boolean}

Property: [ProcessorArchitecture] = Intel {string}

Property: [VersionNT] = 5.1.3 {version}

Running checks for package 'Windows Installer 3.1', phase BuildList

The following properties have been set for package 'Windows Installer 3.1':

Running checks for command 'WindowsInstaller3_1\WindowsInstaller-KB893803-v2-x86.exe'

Result of running operator 'VersionGreaterThanOrEqualTo' on property 'VersionMsi' and value '3.1': true

Result of checks for command 'WindowsInstaller3_1\WindowsInstaller-KB893803-v2-x86.exe' is 'Bypass'

'Windows Installer 3.1' RunCheck result: No Install Needed

Running checks for package '.NET Framework 3.5', phase BuildList

Reading value 'Install' of registry key 'HKLM\Software\Microsoft\NET Framework Setup\NDP\v3.5\1033'

Read integer value 1

Setting value '1 {int}' for property 'DotNet35InstallSuccess'

The following properties have been set for package '.NET Framework 3.5':

Property: [DotNet35InstallSuccess] = 1 {int}

Running checks for command 'DotNetFX35\dotNetFx35setup.exe'

Result of running operator 'ValueEqualTo' on property 'DotNet35InstallSuccess' and value '1': true

Result of checks for command 'DotNetFX35\dotNetFx35setup.exe' is 'Bypass'

'.NET Framework 3.5' RunCheck result: No Install Needed

Launching Application.

Running command 'C:\WINDOWS\system32\msiexec.exe' with arguments ' -I "C:\DOCUME~1\...\LOCALS~1\Temp\7zS909.tmp\MySetup.msi" '

Any ideas ?

Edited by ipen
0

Share this post


Link to post
Share on other sites

You mean this time works on Windows 7 but not on Windows XP?

Maybe you can try to change the config.txt


;!@Install@!UTF-8!
GUIMode="2"
RunProgram="Setup.exe"
RunProgram="MySetup.msi /qn"
;!@InstallEnd@!

*Edit:

It seems you have add an argument with a temp folder : 7zS909.tmp inside your msi file! and the path isn't correct.

Launching Application.

Running command 'C:\WINDOWS\system32\msiexec.exe' with arguments ' -I "C:\DOCUME~1\...\LOCALS~1\Temp\7zS909.tmp\MySetup.msi" '

Edited by myselfidem
0

Share this post


Link to post
Share on other sites

Original SFX module don't support multiple RunProgram. What module are you use? From 7-zip.org or from 7zsfx.info? As I see, you must use modified modules from http://7zsfx.info

0

Share this post


Link to post
Share on other sites

Hi,

I use "7zsd.sfx" from 7zsd_tools_150_2100.exe

Is it the correct version for my needs ?

- run self extructed installer

- run on win XP and win 7

???

Thanks

0

Share this post


Link to post
Share on other sites

when using the "7zsd.sfx" from

7zSD

1.5 beta (build 2478)

May 10, 2012

Modified 32-bit module (for LZMA compression method that 7-Zip uses by default). (downloaded from 7-zip.info)

and trying to run it product - it gives me an error "Could not read SFX configuration or configuration Not found".

When using "7zsd.sfx" from 7z920_extra (downloaded from 7-zip.org) it works but only on win7.

when using "7zsd.sfx" from 7zSD 1.4.3 Release (build 2367) January 21, 2012 (downloaded from 7-zip.info)

it still gives me this

"Could not read SFX configuration or configuration Not found"

Please help!

0

Share this post


Link to post
Share on other sites

That's what we have been TRYING to tell you all along!

Modified 32-bit module (for LZMA compression method that 7-Zip uses by default).
..and as far as the OTHER one mentioned
(myselfidem said) But, if you need for both architecture: 32-bit and 64-bit you need to use 7zsd_All.sfx module
Not really... The set you are getting contains 2 help files and "7zsplit" - the remainder are EXACTLY like the "Extra" package. Read this -
Contains 12 modified modules (six 32-bit modules and six 64-bit ones). There is a separate module for each compression method (LZMA, LZMA2, Deflate, PPMd), as well as universal modules that support any of these methods. Additionally, there are modules with extra dialogs and a banner.
In other words, there is SPECIFICALLY an x86 and an x64 version. "All" means ALL methods (EITHER an x86 OR x64). The "Basic" one (first download "7zsd") is EXACTLY "7zsd_LZMA.sfx" that's inside the package. THAT one is JUST 32-bit for LZMA method (which you have been TRYING to do). The "Tools" one is just the COMPLETE package, OK???

...and do the Create of the SFX.EXE the way I showed you (the "copy" command).

Can I assume that your Windows7 AND WindowsXP are BOTH x86???

edit - In MY example, I used the BETA version from the link given to you. AND the suggestion given above MIGHT be your problem! You MUST use the CORRECT MSIEXEC for the METHOD YOU BUILT THE MSI PACKAGE!!!! You CANNOT build an MSI with a NEWER version and Install it using an OLDER MSIEXEC!

note: use the "7zsplit" program on your "built" EXE - see if you REALLY have it built correctly. Again, Works fine for me (x86)...

Edited by submix8c
0

Share this post


Link to post
Share on other sites

Yes - the commad i use is exactlly like yours.

I tried installing Windows Installer 4.5. Did not help.

Can you please just post the link to what you think is the relevant SFX version - because i am very confused by now...

0

Share this post


Link to post
Share on other sites

"C:\Program Files\7-Zip\7z.exe" a %zipFileName% %allFromOutputDir%

copy /b "C:\Program Files\7-Zip\7zSD_LZMA.sfx" + config.txt + %zipFileName% %outputFile%

where :

%zipFileName% = "MySetup.7z"

%allFromOutputDir% = all of the items that currently exists in the output dir of the setup project. (bin\release\...)

%outputFile% = "MySFX.exe"

this is the config content :

;!@Install@!UTF-8!

RunProgram="setup.exe"

GUIMode="2"

;!@InstallEnd@!

Contents of %allFromOutputDir% (after which the zip contains these items):

- setup.exe (OBVIOUSLY WRITTEN IN-HOUSE TO CHECK/INSTALL)

- "WindowsInstaller3_1" folder (pre - requisite)

--- WindowsInstaller-KB893803-v2-x86.exe (FILE WITHIN FOLDER!!!)

- "DotNetFX35" folder (another pre-requisite)

--- dotNetFx35setup.exe (FILE WITHIN FOLDER!!!)

- MySetup.msi (NOT WITHIN A FOLDER!!!)

===== The Actual SFX Execution =====

<snip>

Running checks for command 'WindowsInstaller3_1\WindowsInstaller-KB893803-v2-x86.exe'

<snip>

Running checks for command 'DotNetFX35\dotNetFx35setup.exe'

(My Note: This is the Bootstrapper and NOT the "Full", correct?)

(http://www.careerride.com/Dot-Net-bootstrapper-application.aspx)

<snip>

Launching Application.

Running command 'C:\WINDOWS\system32\msiexec.exe' with arguments ' -I "C:\DOCUME~1\...\LOCALS~1\Temp\7zS909.tmp\MySetup.msi" '

-----

Result (according to Your Notes):

"This installation package could not be opened..."

(My Note: OBVIOUSLY a result of NOT FINDING THE MSI FILE!)

(My Note: You APPARENTLY have used "\...\" to keep us from seeing UserID?)

-OR-

"Could not read configuration or configuration not found".

(My Note: OBVIOUSLY because CONFIG.TXT is NOT properly included!)

===== Your Comments on Failures =====

The setup alone does work on both OS... (XP and win 7).

Only after creating SFX and using it - it does not work on win XP.

And yes - the setup pre-requisite is to install .net frame work.

(My Note - Your are programmatically checking MS-Installer+DotNET)

On my comuter which OC is win7 - it works good!

(My Note: You are referring to the SFX Install.)

But when i try to run it on WinXP pro x86

i get this error after extraction :

"This installation package could not be opened..."

===== From 7-Zip ORG files =====

Failure #1 -

create the SFX like this :

"C:\Program Files\7-Zip\7z.exe" a %zipFileName% %allFromOutputDir%

copy /b "C:\Program Files\7-Zip\7zS.sfx" + config.txt + %zipFileName% %outputFile%

When running its product - it cause this error :

"This installation package could not be opened..."

Failure #2 -

or like this

"C:\Program Files\7-Zip\7z.exe" a %zipFileName% %allFromOutputDir%

copy /b "C:\Program Files\7-Zip\7zSD_LZMA.sfx" + config.txt + %zipFileName% %outputFile%

When running its product - it cause this error :

"Could not read configuration or configuration not found".

Failure #3 -

I use "7zsd.sfx" from 7zsd_tools_150_2100.exe

Is it the correct version for my needs ?

- run self extructed installer

- run on win XP and win 7

when using the "7zsd.sfx" from

7zSD

1.5 beta (build 2478)

May 10, 2012

Modified 32-bit module (for LZMA compression method that 7-Zip uses by default). (downloaded from 7-zip.info)

and trying to run it product - it gives me an error "Could not read SFX configuration or configuration Not found".

When using "7zsd.sfx" from 7z920_extra (downloaded from 7-zip.org) it works but only on win7.

when using "7zsd.sfx" from 7zSD 1.4.3 Release (build 2367) January 21, 2012 (downloaded from 7-zip.info)

it still gives me this

"Could not read SFX configuration or configuration Not found"

Please help!

1 - DO NOT USE THAT ONE!!! USE THE FIRST ONE (the BETA one!!!)

2 - OR DON'T USE IT, BUT USE THE 7-ZIP ORG ONE

3 - PLEASE NOTE! MSIEXEC CANNOT FIND THE MSI!!!

3a - TRY to put it in a SUBFOLDER and see if that works

3b - NOTE that when you RUN the MSIinstaller AND/OR the DotNETinstaller that they CREATE A TEMP FOLDER ON THE ROOT OF THE LARGEST FREE-SPACE DRIVE!

Your Application is NOT doing that! It is INVOKING the MSIEXEC.EXE Program!

The question is... IS YOUR SETUP.EXE CORRECTLY PASSING THE PATH TO THE MSI FILE???

-To test this - WHEN it Fails with "This installation package could not be opened..." NAVIGATE in EXPLORER to the TEMP folder and SEE IF IT IS INDEED THERE!

Bottom Line - We have NO CLUE how you CREATED the SETUP.EXE PROJECT!!!

(My Note - MAYBE you need to use DOUBLE-QUOTES?)

Go BACK here and read CLOSELY the "Configuration Parameters" section. YOU NEED TO CORRECTLY PASS THE PATH TO THE MSI! PERIOD!!! FORCE it to "somewhere"!!!

Edited by submix8c
0

Share this post


Link to post
Share on other sites

Hi,

Well let me better explain :

"C:\Program Files\7-Zip\7z.exe" a %zipFileName% %allFromOutputDir%

copy /b "C:\Program Files\7-Zip\7zSD_LZMA.sfx" + config.txt + %zipFileName% %outputFile%

where :

%zipFileName% = "MySetup.7z"

%allFromOutputDir% = all of the items that currentlly exists in the output dir of the setup project. (bin\release\...)

%outputFile% = "MySFX.exe"

In addition to supervision given by submix8c, give the same name inside config.txt you use with 7zip:

config.txt


;!@Install@!UTF-8!
GUIMode="2"
RunProgram="MySFX.exe"
;!@InstallEnd@!

*Edit:

Maybe you can try like this (example): without using %zipFileName% !

config.bat


@echo off
SETLOCAL ENABLEEXTENSIONS
echo.

rem All files needed for drivers 32 or 64-bit OS are inside the folder Scan3970:
rem C:\Program Files\7-Zip\Scan3970 (or another partition)
rem D:\Program Files\7-Zip\Scan3970

rem My folder with all my files needed
set AllFileOutputDir=Scan3970

rem MySFX.exe file Name
set OutPutFile=Scan3970.exe

cd /d %~dp0
if exist "%AllFileOutputDir%.7z" del /f /q "%AllFileOutputDir%.7z"
echo.

cd /d "%~dp0%AllFileOutputDir%"

"%~dp07z.exe" a -t7z -mx9 -y "%~dp0%AllFileOutputDir%"
copy /b /y "%~dp07zsd.sfx" + "%~dp0Scan3970.txt" + "%~dp0%AllFileOutputDir%.7z" "%~dp0%OutPutFile%"

pause

Edited by myselfidem
0

Share this post


Link to post
Share on other sites

OK,

1) Why did you decied that " MySetup.msi (NOT WITHIN A FOLDER!!!)" ???

It is in the folder and when checking the zip created after

"C:\Program Files\7-Zip\7z.exe" a %zipFileName% %allFromOutputDir%"

the MSI is present!!!

2) both msi and exe are created from a simple visual studio .net, C# setup project. Framework 3.5..

No problem with that part at all!

More over - and that is the point you keep missing - The self extracting zip works just fine (and run the MSI and all) when i run it on win 7 (extract exe and MSI and execute it all!!!).

The same self extracting zip - will not work on win XP.

SO ???

Edited by ipen
0

Share this post


Link to post
Share on other sites

Why did you decied that " MySetup.msi (NOT WITHIN A FOLDER!!!)" ???

It is in the folder and when checking the zip created after

"C:\Program Files\7-Zip\7z.exe" a %zipFileName% %allFromOutputDir%"

the MSI is present!!!

Because, it seems on Windows XP a subfolder is created inside %temp% and the installation fails.

And why did you decide to set "MySetup.msi" inside a folder first?

Like I suggested inside my last post your "MySetup.msi" is present also but inside the same archive 7z !

Have you tried what submix8c asked (DO NOT CLOSE THE message window!):

-To test this - WHEN it Fails with "This installation package could not be opened..." NAVIGATE in EXPLORER to the TEMP folder and SEE IF IT IS INDEED THERE!

Thanks to let us know!

Edited by myselfidem
0

Share this post


Link to post
Share on other sites

OK... let's get this straight...

Your "built" in VisualStudio "SETUP.EXE" is POINTING AT THE WRONG PLACE (folder) !!! Got it? It's the SETUP.EXE!!!

Launching Application.

Running command 'C:\WINDOWS\system32\msiexec.exe' with arguments ' -I "C:\DOCUME~1\...\LOCALS~1\Temp\7zS909.tmp\MySetup.msi" '

-----

Result (according to Your Notes):

"This installation package could not be opened..."

(My Note: OBVIOUSLY a result of NOT FINDING THE MSI FILE!)

(My Note: You APPARENTLY have used "\...\" to keep us from seeing UserID?)

Please NOTICE that "Documents and Settings" are in an ENTIRELY DIFFERENT PLACE between XP and Win7!!! OK???

Microsoft USUALLY creates a SFX package that GENERATES a COMMON FOLDER NAME in the ROOT directory of the "Largest Free Space HDD" BEFORE the "Setup" program is executed and SETUP uses THAT folder name, UNLIKE 7ZIP!!!

Either CHANGE THE SETUP.EXE program

-OR-

CHANGE THE CONFIG.TXT to create a SPECIFIC folder in the ROOT and Run from THERE!

Did you even READ the DETAILS on parameters in the LINKS given? GO DO SOME READING and TRY it.... DUDE!!! :realmad:

edit - and the suggestion of using a CMD (EXAMPLE GIVEN) was to "beat" it! Learn a little CMD Scripting as well...

edit2 - a little info on Folder Names / Junction Points

Edited by submix8c
0

Share this post


Link to post
Share on other sites

Update -

VS2005 vs VS2008 a bug!

Reference is to IExpress as opposed to 7Zip, but the problem appears to be the same. Just go to the last post in the link and follow the two other post.

0

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now

  • Recently Browsing   0 members

    No registered users viewing this page.