I'm using Inno Setup to create setup file for my application. Inno Setup is based on Delphi Script. I searched for Inno Setup forums and I could not create an user account with any of them. That's why I've decided to post here. While installing I've to check the version of Windows Service Pack installed in a particular system. If it's 2 or below, I've to download vcredist_x86.exe from internet and install it. Before Downloading I need to get the user permission by providing a MessageBox to the user. If the user response is OK, I've to continue downloading and installing. If the user selects Cancel,I need to display a MessageBox stating "Could not continue installation", stop the installation and Quit. How to do this? Can anybody provide some sample code? Please excuse me,if this is a silly question because I've not used Delphi before. Sorry,I've posted this thread in the Introduction thread. Can anybody delete that thread for me?

Inno Setup has pretty complete documentation, but it is not very easy to take in all at once. You need to open the section on "Pascal Scripting" and take a read through it.

There are a variety of ways to handle what you wish to do, but you will probably just want to do something like the following:

Create an InitializeInstall() event handler in your code section, which checks if the file is needed, whether the user wants to download and install it (and continue), continue (without the download -- presumably because the file is already present on the user's system), or cancel. Do as directed.

You can use the functions listed in the "Support Functions Reference" to do things like check Windows version information, check whether specific files are installed, display messages to the user, etc.

Hope this helps.