Archive: custom page won't show


Code snippet would help.

-Stu


custom page won't show
I'm stuck on a problem. I have an installer that works fine if you run it normally, but when it gets run by another process, it fails at the point where it tries to show the first page, which is a custom page.

If I make the first page a MUI page, everything works fine. Or if I display a MessageBox before I try to show the custom page, the custom page will appear.

Here's what I've tried:
-verify custom page init works by writing its HWND to registry
-verify custom page ini file is valid (looks fine and works fine if there's a MB before init)
-system calls ShowWindow and SetWinowPos don't help and their return values indicate success even though the window is not visible

The process just sits there. The command line parameters don't contain '/S.' I am using !insertmacro MUI_RESERVEFILE_INSTALLOPTIONS.

I can't attach my script, but does anyone have ideas from my description?

Thanks.


My company is strict about this, so here's the best I can do.


WriteRegStr HKLM "Software\Poop" "cmdline" "$CMDLINE"

!insertmacro MUI_INSTALLOPTIONS_INITDIALOG "file.ini"

Pop $MUI_HWND

;...
;irrelevant page formatting code

WriteRegStr HKLM "Software\Poop" "preshow" "show"
!insertmacro MUI_PAGE_FUNCTION_CUSTOM SHOW

WriteRegStr HKLM "Software\Poop" "hwnd" "$MUI_HWND"
ShowWindow $MUI_HWND 1
System::Call 'user32::SetWindowPos(i $HWNDPARENT, i -1, i 0, i 0, i 0, i 0, i 0x02|0x01) i.r1'
WriteRegStr HKLM "Software\Poop" "return" "$1"
System::Call 'user32::ShowWindow(i $MUI_HWND, i 1) i .r0'

!insertmacro MUI_INSTALLOPTIONS_SHOW
WriteRegStr HKLM "Software\Poop" "postshow" "show"


"postshow" never gets written to the registry. It does when I manually launch the installer though, which tells me the problem probably isn't in the custom page code. I guess I should look more at the interaction between the launching process and the installer.

I'm not sure what you're trying to do.
What's wrong with this?

Page Custom CustomShow

Function CustomShow
!insertmacro MUI_INSTALLOPTIONS_DIALOG file.ini
FunctionEnd


-Stu

arghhhhhhhhhh!!!!

Just found out that this is only happening for me on a virtual machine. When I try on my own machine, it works ok. Should have thought of that sooner.

Stu, thanks for your suggestions. To answer your question, I was initializing my custom page, then formatting some text, and then showing it.


Let me also say that I'm impressed you were able to post your first response a minute before I even opened the thread :D

Please use your psychic powers for good and not evil!


On the machine that it doesn't show, does the file.ini file get extracted?

-Stu