Super User Asked by Polizi8 on November 1, 2020
I need to compress some files in archives that can be opened by everyone using a Windows PC without 7zip installed.
I thought of running
7z a -t7z -m0=lzma2 -mx=9 -mfb=64 -md=64m -ms=on -sfx -pXXXXXX "dest-archive.exe" "source-folder/"
but this seems to create a Linux (host machine OS) SFX binary.
Is it possible to create Windows SFX archives from Linux?
Is it possible to replace Linux stub with Windows one in already made archives, witout extracting and archiving again?
It doesn't seem to be distributed with the Arch Linux package, but copying the file "C:Program Files7-Zip7z.sfx" to my Linux machine allowed the creation of a Windows SFX archives with
7z a -t7z -m0=lzma2 -mx=9 -mfb=64 -md=64m -ms=on -sfx7z.sfx -pXXXXXX "dest-archive.exe" "source-folder/"
Running
cat 7z.sfx old-linux-archive.exe > new-windows-archive.exe
allowed to prepend the Windows stub to the Linux one, without the need to recompress the archive:
file old-linux-archive.exe
#old-linux-archive.exe: ELF 64-bit LSB pie executable, x86-64, version 1 (SYSV), dynamically linked, interpreter /lib64/ld-linux-x86-64.so.2, BuildID[sha1]=e0e81cea3791be68cca1d95da39fbb406b506cd4, for GNU/Linux 3.2.0, stripped
file new-windows-archive.exe
#new-windows-archive.exe: PE32 executable (GUI) Intel 80386, for MS Windows
Correct answer by Polizi8 on November 1, 2020
1 Asked on November 22, 2021 by srinivas-jyotula
7 Asked on November 22, 2021 by bertiewo
1 Asked on November 22, 2021 by cobra75007
conditional formatting microsoft project text formatting vba
6 Asked on November 22, 2021
1 Asked on November 22, 2021 by chris-w
4 Asked on November 22, 2021
1 Asked on November 22, 2021 by ron-v
1 Asked on November 22, 2021 by litalr
1 Asked on November 22, 2021 by sanketr
2 Asked on November 20, 2021 by gauls
2 Asked on November 20, 2021 by ali-ullah
1 Asked on November 20, 2021 by suikerchiller
2 Asked on November 20, 2021
Get help from others!
Recent Questions
Recent Answers
© 2023 AnswerBun.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP