- NSIS Discussion
- Setting MUI_FINISHPAGE_RUN dynamically?
Archive: Setting MUI_FINISHPAGE_RUN dynamically?
cowwoc
24th June 2005 18:28 UTC
Setting MUI_FINISHPAGE_RUN dynamically?
Hi,
I need to set MUI_FINISHPAGE_RUN dynamically during runtime (whereas by default it is a !define) because the cmdline needs to be defined as:
<path_to_jre>/bin/javaws.exe myApplicationURL.jnlp
I have the ability to determine <path_to_jre> during runtime, but how do I set MUI_FINISHPAGE_RUN accordingly? Is it even possible?
Thanks,
Gili
kichik
24th June 2005 18:30 UTC
Use MUI_FINISHPAGE_RUN_FUNCTION or set MUI_FINISHPAGE_RUN with a variable and then change that variable before the finish page shows.
cowwoc
24th June 2005 18:32 UTC
Oh! That's great! Thank you! :)
cowwoc
24th June 2005 18:49 UTC
BTW: I noticed that if I use nsExec::Exec inside the function, then the installer will "hang" of sorts. That is, you get to the last panel where it says "Run <application name>?" which is checked, you click on FINISH and nothing happens... It doesn't close the panel and you can click FINISH for as long as you want but it won't close. You are forced to abort the installation.
Switching to ShellExec worked. I'm just curious why nsExec::Exec is dieing here...?
kichik
24th June 2005 18:53 UTC
It probably isn't dying but simply waiting for the process to finish.
cowwoc
24th June 2005 18:58 UTC
Except the process is never launched. The exact same process that works in ShellExec "hangs" under nsExec. Odd.
Do you think that maybe at this stage nsExec and other contrib modules are no longer available or something?
cowwoc
24th June 2005 19:02 UTC
Nevermind, it doesn't really matter. I realized I don't really want to wait on the process anyway. Thanks for all your help!
kichik
24th June 2005 19:06 UTC
There's nothing that's stopping nsExec from running in there. I've created a test script that runs makensis.exe there and it worked fine. Can you attach an example, not using java?
BioDuo
25th June 2005 13:26 UTC
Well, don't want to open a new Topic when there's already one on going already
I want to make also a MUI_FINISHPAGE_RUN but it should run the application were the path of the .exe is stored in the register
Example
HCKU "SOftware\BioDuo" "C:\BioDuo\BioDuo.exe"
But how do I do this?
Afrow UK
25th June 2005 13:42 UTC
Use MUI_FINISHPAGE_RUN_FUNCTION...
!define MUI_FINISHPAGE_RUN_FUNCTION finishFunc
!define MUI_FINISHPAGE_RUN_TEXT "Run BioDuo"
Function finishFunc
ReadRegStr $R0 HKCU "Software\BioDuo" "BioDuo"
Exec $R0
FunctionEnd
-Stu