Search code examples
inno-setuppascalscript

Decompiled Inno Setup setup.exe – There are checks but no [Code] section?


I extracted install_script.iss using InnoUnpacker. There are checks: IsNeedRunAdminPrivilegesPackages, not IsClientInstallForbidden. I assume those are custom functions? I don't see [Code] section in iss file. How does it work? Is [Code] section mandatory and InnoUnpacker hasn't unpacked it correctly?

[Files]
Source: "{tmp}\AdminPrivilegesPackages Installer.exe"; DestDir: "{tmp}"; Check: "IsNeedRunAdminPrivilegesPackages"; AfterInstall: "InstallMcComponent(ExpandConstant('{cm:AdminPackages}'),'AdminPrivilegesPackages Installer.exe', '/VERYSILENT /LOG /NOCANCEL')"; MinVersion: 0.0,6.0; Flags: deleteafterinstall 
Source: "{tmp}\MacroscopClient Installer_x64.exe"; DestDir: "{tmp}"; Check: "not IsSelectedX86Platform and not IsClientInstallForbidden"; AfterInstall: "InstallClient"; MinVersion: 0.0,6.0; Flags: deleteafterinstall 
Source: "{tmp}\MacroscopPlayer Installer.exe"; DestDir: "{tmp}"; Check: "not IsClientInstallForbidden"; AfterInstall: "InstallMcComponent('Macroscop Player', 'MacroscopPlayer Installer.exe', '/VERYSILENT /LOG /NOCANCEL /WITHOUTDEPS')"; MinVersion: 0.0,6.0; Flags: deleteafterinstall 

Solution

  • The [Code] is compiled into CompiledCode.bin, which I believe the InnoUnpacker extracts – though there are similarly named tools, so I'm not sure which one you are actually using. Anyway, I'm not aware of any working tool that can decompile the CompiledCode.bin back into Pascal Script code.

    See also How to decompile CompiledCode.bin extracted with Inno Setup Unpacker.