MSFN Forum: 7z Self extracting - MSFN Forum

Jump to content


Unattended CD/DVD Guide Homepage · MSFN Forum Rules

Welcome to the Applications Installs forum. Make sure you read the forum rules before you start posting.

Links/Requests to warez and/or any illegal material (porn, cracks, serials, etc..) will not be tolerated. Discussion of circumventing WGA/activation/timebombs/keygens or any other illegal activity will also not be tolerated.

We try our best to keep this forum clean of illegal content. If you see any illegal activity use the "report" button you find in every post to report the specific post to the moderators. If you ignore any of the rules you will be banned without notice.

Read Forum Rules
  • 2 Pages +
  • 1
  • 2
  • You cannot start a new topic
  • You cannot reply to this topic

7z Self extracting SFX for installers doen not work on WinXP pro X86 Rate Topic: -----

#1 User is offline   ipen 

  • Newbie
  • Group: Members
  • Posts: 11
  • Joined: 09-May 12
  • OS:XP Pro x86
  • Country: Country Flag

Posted 09 May 2012 - 12:54 AM

Hello all,
I been trying to create a self extracting zip (SFX) to contain my installation folder.
I am using 7z modules like "7zs.Sfx" or "7zSD_Lzma.sfx".

I created a zip which after extraction run the "setup.exe" .
this is the command lines in the batch file :

"C:\Program Files\7-Zip\7z.exe" a %zipFileName% %allFromOutputDir% (creating a 7z zip)
copy /b "C:\Program Files\7-Zip\7zS.sfx" -y + MCTSFXConfig.txt + %zipFileName% %outputFile% (Creating self extracting zip)


this is the config content :

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


On my comuter which OC is win7 - it works good!
But when i try to run it on WinXP pro x86
i get this error after extraction :
"This installation package could not be opened..."

So i tried different command for SFX :

"C:\Program Files\7-Zip\7z.exe" a %zipFileName% %allFromOutputDir%
copy /b "C:\Program Files\7-Zip\7zSD_LZMA.sfx" + MCTSFXConfig.txt + %zipFileName% %outputFile%

and when i am trying to run its out put - i get this error :

"Could not read configuration or configuration not found".
NOTE : it is the same configuration...

Please help !


#2 User is offline   Geej 

  • Senior Member
  • PipPipPipPip
  • Group: Members
  • Posts: 634
  • Joined: 01-January 08
  • OS:XP Pro x86
  • Country: Country Flag

Posted 09 May 2012 - 11:39 PM

I dun really know, just try rename MCTSFXConfig.txt to config.txt

Cheers!

#3 User is offline   myselfidem 

  • Member
  • PipPipPipPipPipPipPipPip
  • Group: Members
  • Posts: 2,390
  • Joined: 06-January 10
  • OS:Windows 7 x86
  • Country: Country Flag

Posted 20 May 2012 - 01:11 PM

You can try to use 7zsd.sfx ! And check if your config.txt is saved in UTF-8 encoding:

Downloads

Create your batch file config.bat inside your folder location and after you created the archive with 7zip, launch the batch file, to create the exe file:

config.bat (example for folder.exe, using 7zsd.sfx module)
@copy /b 7zsd.sfx + config.txt + folder.7z folder.exe

This post has been edited by myselfidem: 20 May 2012 - 01:34 PM


#4 User is offline   ipen 

  • Newbie
  • Group: Members
  • Posts: 11
  • Joined: 09-May 12
  • OS:XP Pro x86
  • Country: Country Flag

Posted 22 May 2012 - 02:59 AM

Hi,
Tried all that - did not work...
Thanks
Iris

#5 User is offline   myselfidem 

  • Member
  • PipPipPipPipPipPipPipPip
  • Group: Members
  • Posts: 2,390
  • Joined: 06-January 10
  • OS:Windows 7 x86
  • Country: Country Flag

Posted 22 May 2012 - 04:32 AM

View Postipen, on 09 May 2012 - 12:54 AM, said:

I created a zip which after extraction run the "setup.exe" .
this is the command lines in the batch file :

"C:\Program Files\7-Zip\7z.exe" a %zipFileName% %allFromOutputDir% (creating a 7z zip)
copy /b "C:\Program Files\7-Zip\7zS.sfx" -y + MCTSFXConfig.txt + %zipFileName% %outputFile% (Creating self extracting zip)

Where did you found this method? Strange! :blink:

This post has been edited by myselfidem: 22 May 2012 - 04:43 AM


#6 User is offline   jaclaz 

  • The Finder
  • Group: Developers
  • Posts: 11,433
  • Joined: 23-July 04
  • OS:none specified
  • Country: Country Flag

Posted 22 May 2012 - 09:50 AM

I can assure that 7-zip selfextractor do normally work on 2K and XP.
Casbah and it's predecessors make use of a similar approach, and have worked allright since a few years, so what you report is strange:
http://reboot.pro/4023/
maybe you can find something that has been overlooked by comparing what you do with the contents of the "historical threads":
http://www.911cd.net...topic=18845&hl=
http://reboot.pro/628/
http://www.911cd.net...showtopic=21123

jaclaz

#7 User is offline   submix8c 

  • Inconceivable!
  • Group: Patrons
  • Posts: 3,244
  • Joined: 14-September 05
  • OS:none specified
  • Country: Country Flag

Posted 24 May 2012 - 09:50 AM

Hmmm... one would assume the CONFIG.TXT is as follows -

Quote

7zSD.sfx Windows version for installers (uses MSVCRT.dll).
(using the one linked to by myselfidem...)

Quote

Installer Config file format
This config file contains commands for the Installer. The file begins with the string ;!@Install@!UTF-8! and ends with ;!@InstallEnd@!. The file must be written in UTF-8 encoding.
This "setup.exe' is compatible with both OS', right? (you never even said what it is / where it's from...)

#8 User is offline   ipen 

  • Newbie
  • Group: Members
  • Posts: 11
  • Joined: 09-May 12
  • OS:XP Pro x86
  • Country: Country Flag

Posted 30 May 2012 - 02:59 AM

Yep - the 'setup.exe' works just fine on both OS.
Only when using the SFX - it fails on XP.

#9 User is offline   ipen 

  • Newbie
  • Group: Members
  • Posts: 11
  • Joined: 09-May 12
  • OS:XP Pro x86
  • Country: Country Flag

Posted 30 May 2012 - 04:56 AM

Hi,
Tried all the above - still same errors.
I have a VS.net setup project - creating my setup.exe file.
Then i have a post build event - trying to 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..."


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".

config file is saved in UTF-8 encoding.

NOTE : both errors only happen on win XP .
On win 7 - it works great!!!

Any other suggestions ?

This post has been edited by ipen: 30 May 2012 - 05:13 AM


#10 User is offline   bphlpt 

  • MSFN Expert
  • PipPipPipPipPipPip
  • Group: Members
  • Posts: 1,077
  • Joined: 12-May 07

Posted 30 May 2012 - 08:42 AM

Are all apps involved, both the ones you make and the tools used to make them, all 32 bit apps? No 64 bit apps are there? Are both your installations of XP and Win7 32 bit versions?

Cheers and Regards

#11 User is offline   myselfidem 

  • Member
  • PipPipPipPipPipPipPipPip
  • Group: Members
  • Posts: 2,390
  • Joined: 06-January 10
  • OS:Windows 7 x86
  • Country: Country Flag

Posted 30 May 2012 - 10:17 AM

View Postipen, on 30 May 2012 - 04:56 AM, said:

Tried all the above - still same errors.
I have a VS.net setup project - creating my setup.exe file.


Maybe you need to check if your VS.net creating your customized setup.exe is compatible with Windows XP?

#12 User is offline   submix8c 

  • Inconceivable!
  • Group: Patrons
  • Posts: 3,244
  • Joined: 14-September 05
  • OS:none specified
  • Country: Country Flag

Posted 31 May 2012 - 05:14 PM

Quote

I have a VS.net setup project - creating my setup.exe file.
BWAHAHAHAH!!!! You need dotNET Runtime installed BEFORE running the Install App, I betcha!!!! Notice that that tiny little detail (the quote) was what you neglected to tell anyone.

XP does NOT install dotNet "by default", but... Win7 DOES!!!! :lol:

This post has been edited by submix8c: 31 May 2012 - 05:15 PM


#13 User is offline   ipen 

  • Newbie
  • Group: Members
  • Posts: 11
  • Joined: 09-May 12
  • OS:XP Pro x86
  • Country: Country Flag

Posted 06 June 2012 - 08:22 AM

Look,
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.

Any other suggestions ?
Thanks
Iris

#14 User is offline   submix8c 

  • Inconceivable!
  • Group: Patrons
  • Posts: 3,244
  • Joined: 14-September 05
  • OS:none specified
  • Country: Country Flag

Posted 06 June 2012 - 09:07 AM

YES!!!!!

Riddle me this, Batman!

WHAT is the ACTUAL value of variable
%allFromOutputDir%

This may help, since this is CREATED on Win7...

edit - AMAZING!!!!!
1 - I first 7-zipped notepad.exe (JUST THAT and NOT the Folder)
2 - I then created a config.txt EXACTLY like yours (changed pgm to NOTEPAD.EXE)
3 - I then ran this command
copy /-Y /B 7zsd.sfx+config.txt+notepad.7z 7ztest.exe
4 - I then double-clicked 7ztest.exe - NOTEPAD OPENED!!!

Dude, you are doing something WRONG!!!! See MY "copy" command! YES, it DOES work!

Please note I used this one...

This post has been edited by submix8c: 06 June 2012 - 09:26 AM


#15 User is offline   myselfidem 

  • Member
  • PipPipPipPipPipPipPipPip
  • Group: Members
  • Posts: 2,390
  • Joined: 06-January 10
  • OS:Windows 7 x86
  • Country: Country Flag

Posted 06 June 2012 - 11:53 AM

It's not the best way to create your SFX file inside the folder: C:\Program Files\7-Zip

But, if you need for both architecture: 32-bit and 64-bit you need to use 7zsd_All.sfx module

Quote

All module versions (7zSD) for installers use MSVCRT.dll (Microsoft Visual C runtime library). In other words, some functions are performed via this dynamic library, and this helps reduce the module size. This file is present in all operating systems supported by the module. Old module versions (7zS) that did not require MSVCRT.dll are no longer supported.


I create an SFX file inside this folder for Scanjet 3970 series drivers (as example), like this:

config.bat
@echo off
if exist "%~dp0Scan3970.7z" del /f /q "%~dp0Scan3970.7z"
echo.
cd "%~dp0Scan3970"
"%~dp07z.exe" a -t7z -mx9 -y "%~dp0Scan3970"
@copy /b /y "%~dp07zsd.sfx" + "%~dp0Scan3970.txt" + "%~dp0Scan3970.7z" "%~dp0Scan3970.exe"
pause



Scan3970.txt
;!@Install@!UTF-8!
; Mode silencieux pour HP Scanjet3970 series x86
GUIMode="2"
RunProgram="hidcon:cmd /c xcopy \"%%T\\*.*\" %SYSTEMDRIVE%\\Drivers\\Scanjet\\ /s /e /i /y"
RunProgram="%SYSTEMDRIVE%\\Drivers\\Scanjet\\DPInst32.exe /SW"
;!@InstallEnd@!



Output result
Spoiler


*Edit:
Tested also on XP and works fine!
It seems with Windows XP, there is an subfolder inside your temp folder!
HTH

This post has been edited by myselfidem: 16 June 2012 - 01:46 PM


#16 User is offline   ipen 

  • Newbie
  • Group: Members
  • Posts: 11
  • Joined: 09-May 12
  • OS:XP Pro x86
  • Country: Country Flag

Posted 10 June 2012 - 01:47 AM

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

#17 User is offline   ipen 

  • Newbie
  • Group: Members
  • Posts: 11
  • Joined: 09-May 12
  • OS:XP Pro x86
  • Country: Country Flag

Posted 10 June 2012 - 02:23 AM

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 ?

This post has been edited by ipen: 10 June 2012 - 02:24 AM


#18 User is offline   myselfidem 

  • Member
  • PipPipPipPipPipPipPipPip
  • Group: Members
  • Posts: 2,390
  • Joined: 06-January 10
  • OS:Windows 7 x86
  • Country: Country Flag

Posted 10 June 2012 - 03:10 AM

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.

Quote

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


This post has been edited by myselfidem: 10 June 2012 - 03:33 AM


#19 User is offline   Oleg_Sch 

  • Newbie
  • Group: Members
  • Posts: 32
  • Joined: 09-July 07

Posted 11 June 2012 - 05:01 PM

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

#20 User is offline   ipen 

  • Newbie
  • Group: Members
  • Posts: 11
  • Joined: 09-May 12
  • OS:XP Pro x86
  • Country: Country Flag

Posted 13 June 2012 - 07:33 AM

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

Share this topic:


  • 2 Pages +
  • 1
  • 2
  • You cannot start a new topic
  • You cannot reply to this topic

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users



All trademarks mentioned on this page are the property of their respective owners
Copyright © 2001 - 2013 msfn.org
Privacy Policy