Way to construct Innosetup setup script from Executable - inno-setup

I had put little bit effort to create an Inno installer.It had around 2 files.I just missed backuping 1 file.So is there a way to contruct the inno setup script from the compiled installer.

Related

Multiple output directories

Is it possible to use as an output directory not only one location?
Something like this:
[Setup]
OutputDir=C:\MyProject; C:\Installers
No, you cannot.
If you are compiling the installer as a part of a larger build process, you can clone the output files as part of that.
See also:
Run a [Code] or PowerShell script in Inno Setup compiler
One possible hack would be to execute some script in the background using preprocessor (as shown in the answer to the question above). And have the script watch for changes to the output file and copy it over to the other destination.

Inno setup to sequentially execute other uninstallers (3rd party apps)

I have search for almost 2 days including going through regular documentation for inno setup. But I have not found a way for Inno setup to sequentially execute other uninstallers (3rd party apps), as items in the [UninstallRun] section. Since the other uninstallers are "cloned" the "waituntilterminated" flag doesn't work on those uninstallers. Has anyone come up with a way to accomplish this?
Thanks,
David
If the other uninstallers are Inno Setup-made, then I do not think you need to do anything special.
Inno Setup-made uninstaller really clones itself and run its clone internally. But it waits for the clone to actually complete the uninstallation before it closes itself. The only thing, that the clone does after the main uninstaller processes closes, is that it deletes the uninstaller executable (and its data files). I do not think you really need to wait for this to done. But if you do, just wait for the uninstaller files to be gone, before you proceed with the other uninstaller.

Is there a way to use .pas files in Inno Setup?

I need to do encryption and decryption of a string in Inno Setup through Rijndael algorithm. I've found out that people are using DCPcrypt library to do what I need in Pascal, but they are using files with .pas extension. And I don't know if there is a way to use those files, and methods from those files in Inno Setup script? I've used .dll files and methods from those files before to do some operations in Inno Setup script, so I'm wondering if there is a way to do the same with .pas files?
Inno Setup Pascal Script and Pascal language have much similarity. But the Pascal Script is a way more limited and not really compatible. So there is a very little chance that you can use any more-than-trivial Pascal code in Inno Setup.
You can of course build a DLL from that Pascal code and use it in Inno Setup.
This may help:
https://delphi.fandom.com/wiki/Creating_DLLs
As Rijandel is also implemented in .NET, you can also consider creating a DLL in .NET/C#:
Calling .NET DLL in Inno Setup
Though, make sure you really want Rijandel and not AES.
Also this really looks like an XY problem. You should rather ask, "How to implement Rijandel (or AES) encryption in Inno Setup".

How to execute program before the uninstallation starts?

Can InnoSetup execute a program before the uninstallation starts? My program creates some registry values. I have an executable that can remove those registry values and my question is, can InnoSetup run that executable before the uninstallation starts?
See the documentation on Setup Script Sections, particularly the UninstallRun one at the bottom of the tree:
[UninstallRun]
Filename: "{app}\INIT.EXE"; Parameters: "/x"
If you need to do something more complex, you can also do it in code using the Pascal scripting functionality in InnoSetup. See UninstallCodeExample1.iss' in theInnoSetup 5\Examples` folder.

How do I build two different installers from the same script in Inno Setup?

I want to make a "standard" install for external use, but I also want to use the same script and tell it (with a command line param perhaps?) to include another set of files (PDB files for debugging) for our lab installations. (And make a totally different install exe)
How can I do this? Is it possible?
I don't see how to set this in the [Files] section (conditionally add files based on some value/param)
Note – this is not for allowing the user an option DURING the install. I want a build-time option to set in my hudson build or batch file.
I suppose I can just create a separate installer for the pdbs, but I'd rather just have one file to do everything.
You can simply use
#ifdef DebugVersion
File: *.pdb ...
#endif
and then call the Inno compiler like this:
iscc.exe -DDebugVersion ...
I'd also add something like this so you get different output file names:
#ifdef DebugVersion
OutputBaseFileName=mysetup-dbg
#else
OutputBaseFileName=mysetup
#endif
Note that you'll probably need the InnoSetup precompiler for this, which, for some inexplicable reason, is not part of the default InnoSetup package. The easiest way to get it is to get the "Quick Start Pack" from the InnoSetup download page.
The answer is simple: create two files for each release, but put the common stuff in a third file and #include it in the other two.
http://rickborup.blogspot.com/2006/09/inno-setup-include-directive.html

Resources