Skip to content
⌘ NSIS Forum Archive

Showing Custom Page while running a process

4 posts

zbd#

Showing Custom Page while running a process

Hi, I am trying to show a custom page while i'm searching the registry for a value. But i can't seem to work out how to do it.

I was thinking something like the code below might do, but i cant seem to work it out. It just wants to stop at the custom page so the user has to click next before the search begins.


${Do}
; Display the page from ini file extracted onInitialisation (look at function .onInit for files)
!insertmacro MUI_INSTALLOPTIONS_DISPLAY "searching"
${LoopUntil} $R1 == 0
I basically thought, because the handle ($R1) becomes 0 once the search has finished, i could use that to tell the page to stop displaying because the search has finished. No luck

Cheers
Afrow UK#
That won't work because InstallOptions stops code execution until the user clicks Next.

You probably want to display a banner using the Banner plug-in.

Stu
zbd#
Hi Afrow UK,

So does there have to be a page for it to display in front of?
Or does it only work in Sections?

I cant work out how to have it displaying while i'm searching the registry. Is there any more detailed examples apart from the wiki and in the plugin zip?
Afrow UK#
You call the plugin to display the banner, search the registry, and then destroy the banner when that is finished. As I have already said, you cannot display an InstallOptions dialog while doing something else, unless you write a plugin using a separate thread at the same time and then use ExecuteCodeSegment when that thread has finished to call a NSIS function.

You can use the banner plugin anywhere where run-time code is executed.

Stu