Inno Setup - Post Processing - inno-setup

I would like to build an MD5 checksum file of the setup file generated by Inno Setup. I've found the pre-processor and was wondering if there is a way to do some processing once the 'setup' output file has been created.
It needs to run at the compile time not during installation.

If you are automating your build, just use command-line compiler from a batch file (or any other script).
And as a next step, run a tool to calculate the checksum.
"C:\Program Files (x86)\Inno Setup 5\ISCC.exe" Example1.iss
certutil -hashFile mysetup.exe MD5
Alternatively, use Inno Script Studio (clone of Inno Setup).
It has [PostCompile] section. In its GUI, it's "Post Compilation Steps".

Related

Creating Zip File in Inno Setup Script

Suppose I want to put a zip file in the installation path after installation. But this zip file is not available to me, so it has to be created in the build process.
And a folder must be added to another folder and the zip file must be created from it.
For example I have:
C:Folder1
C:Folder2
And zip file must be:
C:Folder1/Folder2
With all the files in respective folder.
I have unfortunately very little experience with Inno-Setup and this particular problem with the folder in another folder pack without changing the source path but a zip file in .exe to do I find nowhere.
Inno Setup cannot create a zip file for you while compiling.
But you have two options how to delegate the zip creation to an external process
If you are automating complex build process, you will likely be running Inno Setup command-line iscc compiler. So just before running it in your batch build process, run another process/software/tool to create the zip file.
For some example, see:
Inno Setup Pre- / Post- compile action
If you really want to create the zip file on the fly, while manually building the installer in Inno Setup GUI, you can use preprocessor Exec function to start an process/software/tool to create the zip file before the actual compiling begins.
For some examples, see:
Inno Setup Pre- / Post- compile action
Create files in Inno Setup setup needed by the [Files] section
Is it possible to call a batch file while compiling an Inno Setup script?
As for the actual zip file creation, that's not really Inno Setup question anymore. You will file lot of question about that, for example:
Batch file script to zip files

Inno Setup copy OutputBaseFileName in PostCompile section

I want copy OutputBaseFileName to archive after Inno Setup Studio script compiling is finished.
I prepared this script but it doesn't work.
[PostCompile]
Name: CopyFile({#OutputBaseFilename}, '\\Bckserver\Source\'{#OutputBaseFilename});
I will guess that you want to have the compiler copy the generated installer to yet another directory (\\Bckserver\Source).
This works:
Name: "C:\Windows\System32\cmd.exe"; Parameters: "/c copy C:\path\setup.exe \\Bckserver\Source"
I do not think there's better solution, as Inno Setup Studio does not support preprocessor in the PostCompile section, so you cannot refer to OutputBaseFilename or system directory other than by hard-coding them.

inno setup doesn't decompress each .bin file

I downloaded an iso which contains the files
setup.exe
setup-1.bin
setup-2.bin
It fails to install by executing the setup.exe so I analyzed it with innoextract, which opens just setup-1.bin but not setup-2.bin. Can I manually decompress the .bin files or modify the setup.exe? If yes, how can I do that?
I think the second bin file is just corrupted, so i'm unable to extract it.
That is the reason why Inno Setup cannot continue in installation.
I think this is an answer - you simply need to download the installer again.

Installshield - The files for installation requirement could not be found. The installation will now stop

I am using InstallShield to build an installer to install some custom prerequisites on my client computers. But everytime I try to run the installer, I get:
The files for installation requirement Crystal Runtime x86 could not be found. The installation will now stop. This is probably due to a failed, or canceled download.
I have told the prereq where the File sits on my local development machine, and it seems like InstallSheild takes this file, and copies it to the ISSetupPrerequisites folder in the same directory as the .exe file it generates. I can confirm my file exists in the ISSetupPrerequisites folder.
Is there something else I need to do to tell the installer where my .msi installer is for my prerequisite?
My guess is that you've copied the installer (setup.exe or something similar) to the PC that you're installing on but not the ISSetupPrerequisites folder. You need to do this because you haven't changed the setting that puts the prerequisites (Crystal Runtime x86 in your case) inside the installer itself.
To enable this, go to your release's "Setup.exe" tab and change the value of the property called "InstallShield Prerequisites Location" from "Copy From Source Media" to "Extract From Setup.exe".
You should verify the checksum and filesize attributes in the redistributable's pre-requisite file. If these don't match the local/downloaded file you'll see that error
(Example files node for MSFT VS 2010 Tools for Office Runtime)
<files>
<file LocalFile="<ISProductFolder>\SetupPrerequisites\VSTOR\vstor_redist.exe" URL="http://download.microsoft.com/download/B/5/1/B51D2F9E-1432-4B76-8248-F47316BB8EE0/vstor_redist.exe" CheckSum="a1b5c8fb246a9d0d66f12d3b6f5e471d" FileSize=" 0,40051808"></file>
</files>
Make sure the CheckSum value inside the .prq file is exactly the same as the MD5 checksum of the package copies on the web url and under < ISProductFolder >\SetupPrerequisites
You can calculate MD5 on windows using the command
certutil.exe -hashfile myPackage.exe MD5

How to create log file for a launched setup.exe

I have inherited some InstallShield InstallScript projects.
I am currently using InstallShield 2009.
I cannot seem to create a log file when I run the setup.exe.
What command line options do I need to specify?
InstallShield has a method for creating a log file for the Setup.exe and Update.exe bootstrappers. You can simply use the /debuglog parameter from the command line when you run Setup.exe. This command line parameter can be used with the Setup launcher for Basic MSI, InstallScript MSI, and Web projects.
Here it is:
Setup.exe /debuglog
You will notice that a file called InstallShield.log has been created in the same folder as Setup.exe.
For more read >> http://www.installationdeveloper.com/686/using-log-files-in-installshield/
There is no such feature in InstallScript project types. The really good logging is in MSI project types. InstallScript really only has the ability to record a response file and generate a very terse logfile as part of a silent install. (/s /f1 /f2 arguments)
Setup.exe Command-Line Parameters
You can add registry settings which will tell Windows Installer to log your installation.
The registry settings you'll need are:
Windows Registry Editor Version 5.00
[HKEY_LOCAL_MACHINE\Software\Policies\Microsoft\Windows\Installer]
"Logging"="voicewarmup"
"Debug"=dword:00000007
Once you run the installation, navigate to %temp% inside windows explorer and there will be .LOG files with a naming scheme of MSI#####.LOG.
NOTE: This should log all installations on your machine, so you may want to delete these registry settings when you're done.

Resources