7z Self extracting SFX for installers doen not work on WinXP pro X86
#1
Posted 09 May 2012 - 12:54 AM
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
Posted 09 May 2012 - 11:39 PM
Cheers!
#3
Posted 20 May 2012 - 01:11 PM
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
#5
Posted 22 May 2012 - 04:32 AM
ipen, on 09 May 2012 - 12:54 AM, said:
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!
This post has been edited by myselfidem: 22 May 2012 - 04:43 AM
#6
Posted 22 May 2012 - 09:50 AM
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
Posted 24 May 2012 - 09:50 AM
Quote
Quote
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.
#8
Posted 30 May 2012 - 02:59 AM
Only when using the SFX - it fails on XP.
#9
Posted 30 May 2012 - 04:56 AM
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
Posted 30 May 2012 - 08:42 AM
Cheers and Regards
#11
Posted 30 May 2012 - 10:17 AM
#12
Posted 31 May 2012 - 05:14 PM
Quote
XP does NOT install dotNet "by default", but... Win7 DOES!!!!
This post has been edited by submix8c: 31 May 2012 - 05:15 PM
#13
Posted 06 June 2012 - 08:22 AM
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
Posted 06 June 2012 - 09:07 AM
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.exe4 - 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
Posted 06 June 2012 - 11:53 AM
But, if you need for both architecture: 32-bit and 64-bit you need to use 7zsd_All.sfx module
Quote
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
*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
Posted 10 June 2012 - 01:47 AM
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
Posted 10 June 2012 - 02:23 AM
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
Posted 10 June 2012 - 03:10 AM
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
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
Posted 11 June 2012 - 05:01 PM
#20
Posted 13 June 2012 - 07:33 AM
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



Help

Back to top









