Hello i'm really a newbie can anyone help me?

85 views
Skip to first unread message

okiroki34

unread,
Jun 12, 2025, 2:11:33 PM6/12/25
to innosetup
Hello!  Im just trying create an installer that extract compressed files. The compressed files made with 7zip.

This code made with AI:

[Setup]
AppName=My Large App
AppVersion=1.0
DefaultDirName={pf}\My Large App
OutputBaseFilename=MyInstaller
OutputDir=C:\Users\Beni\Desktop\TEST
Compression=none
SolidCompression=no

[Files]
; Copy 7z.exe to {tmp} to run extraction, delete after install
Source: "7z.exe"; DestDir: "{tmp}"; Flags: deleteafterinstall

; External multi-volume archive files (already renamed), must be alongside installer
Source: "data.7z.001"; DestDir: "{src}"; Flags: external
Source: "data.7z.002"; DestDir: "{src}"; Flags: external
Source: "data.7z.003"; DestDir: "{src}"; Flags: external

[Run]
Filename: "{tmp}\7z.exe"; Parameters: "x -y {src}\data.7z.001 -o{app}"; \
  StatusMsg: "Extracting application files..."; Flags: runhidden waituntilterminated

The installer giving me an error, says "The source file "data.7z.001" does not exist. Is it even possible to do what I want?
I upload an image from the main folder and from the installation procces.

Thanks!
Képernyőkép 2025-06-12 194900.png
Desktop Screenshot 2025.06.12 - 19.44.21.57.png

Gavin Lambert

unread,
Jun 12, 2025, 7:22:48 PM6/12/25
to innosetup
On Friday, June 13, 2025 at 6:11:33 AM UTC+12 okiroki34 wrote:
Hello!  Im just trying create an installer that extract compressed files. The compressed files made with 7zip.

If all you are doing is extracting a 7z archive, why are you making an installer?  Just make a SFX 7zip.

The best practice for an installer is to not install everything from a 7z in the first place, but to list the [Files] and let Inno compress things.  It usually produces better results, both in compression and in proper handling of uninstalls.

If you really must use an external archive, then consider upgrading Inno to the latest version which already includes an archive extraction feature, so you don't need to bundle 7z.exe with the installer.

Having external flagged files with DestDir: {src} is just silly -- by definition they're already there, so there's no point in listing them at all.
 
This code made with AI

Though this is also likely the real problem with your approach.  AI is crap.  It can sometimes generate a decent skeleton of things to get you started, but you still need to understand it to fix its mistakes and improve the design.  In this case, it looks like you didn't even read the comment it generated that the archive files have to be distributed as well, because they didn't get embedded into the installer (because the AI generated crap code).  So you tried to run the installer by itself and got the expected error.

okiroki34

unread,
Jun 13, 2025, 9:25:00 AM6/13/25
to innosetup
Where can i upgrade to latest version? In v6.4.3 i cant acces the archive extraction features like this: https://jrsoftware.org/ishelp/index.php?topic=isxfunc_extractarchive

Martijn Laan

unread,
Jun 16, 2025, 5:04:10 AM6/16/25
to innosetup
In 6.4.3 the function is called Extract7ZipArchive.

Be sure to read about its limitations.

Better yet, use an self-extracting archive like Gavin said.

Greetings,
Martijn

Op 13-6-2025 om 15:24 schreef okiroki34:
--
You received this message because you are subscribed to the Google Groups "innosetup" group.
To unsubscribe from this group and stop receiving emails from it, send an email to innosetup+...@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/innosetup/5807e2f7-423c-4184-a9d5-aefc6d96b3fdn%40googlegroups.com.

Reply all
Reply to author
Forward
0 new messages