The Pascal scripting feature (modern Delphi-like Pascal) adds lots of new possibilities to customize your Setup or Uninstall at run-time. Some examples:
An integrated run-time debugger to debug your custom Pascal script is also available.
The scripting engine used by Inno Setup is RemObjects Pascal Script by Carlo Kok. Like Inno Setup, RemObjects Pascal Script is freely available and comes with source. See http://www.remobjects.com/ps for more information.
Note: the Pascal scripting feature works exclusively at run-time, and has no compile-time functionality.
Creating the [Code] section
BeforeInstall and AfterInstall Parameters
Support Functions Reference
Support Classes Reference
Using Custom Wizard Pages
Using COM Automation objects