How to modify long running script so it will not freeze Inno Setup GUI?

The output progress pages are designed for providing feedback on longer running operations.

But in order for this to be effective you have to be able to keep Inno updated on your current progress by periodically calling methods on this page.

There is a library that will let you pass an Inno script function as a callback to a DLL, which may be of use. You may also want to look at using the ITDownload script from the same site, which lets you do HTTP access from within Inno itself, avoiding the middle-man.

However Inno is inherently single-threaded and GUI-thread-affine, so calling blocking operations directly will always block the UI without special provision. Running code from within a separate thread is possible (but only within a DLL, and you have to be very careful); other options include making asynchronous calls only, or calls which internally maintain GUI updates, such as Exec.

Leave a Comment

tech