Old 24th June 2005, 17:28   #1
cowwoc
Member
 
Join Date: Feb 2005
Posts: 51
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
cowwoc is offline   Reply With Quote
Old 24th June 2005, 17:30   #2
kichik
M.I.A.
[NSIS Dev, Mod]
 
kichik's Avatar
 
Join Date: Oct 2001
Location: Israel
Posts: 11,343
Use MUI_FINISHPAGE_RUN_FUNCTION or set MUI_FINISHPAGE_RUN with a variable and then change that variable before the finish page shows.

NSIS FAQ | NSIS Home Page | Donate $
"I hear and I forget. I see and I remember. I do and I understand." -- Confucius
kichik is offline   Reply With Quote
Old 24th June 2005, 17:32   #3
cowwoc
Member
 
Join Date: Feb 2005
Posts: 51
Oh! That's great! Thank you!
cowwoc is offline   Reply With Quote
Old 24th June 2005, 17:49   #4
cowwoc
Member
 
Join Date: Feb 2005
Posts: 51
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...?
cowwoc is offline   Reply With Quote
Old 24th June 2005, 17:53   #5
kichik
M.I.A.
[NSIS Dev, Mod]
 
kichik's Avatar
 
Join Date: Oct 2001
Location: Israel
Posts: 11,343
It probably isn't dying but simply waiting for the process to finish.

NSIS FAQ | NSIS Home Page | Donate $
"I hear and I forget. I see and I remember. I do and I understand." -- Confucius
kichik is offline   Reply With Quote
Old 24th June 2005, 17:58   #6
cowwoc
Member
 
Join Date: Feb 2005
Posts: 51
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 is offline   Reply With Quote
Old 24th June 2005, 18:02   #7
cowwoc
Member
 
Join Date: Feb 2005
Posts: 51
Nevermind, it doesn't really matter. I realized I don't really want to wait on the process anyway. Thanks for all your help!
cowwoc is offline   Reply With Quote
Old 24th June 2005, 18:06   #8
kichik
M.I.A.
[NSIS Dev, Mod]
 
kichik's Avatar
 
Join Date: Oct 2001
Location: Israel
Posts: 11,343
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?

NSIS FAQ | NSIS Home Page | Donate $
"I hear and I forget. I see and I remember. I do and I understand." -- Confucius
kichik is offline   Reply With Quote
Old 25th June 2005, 12:26   #9
BioDuo
Junior Member
 
Join Date: Jun 2005
Posts: 21
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?
BioDuo is offline   Reply With Quote
Old 25th June 2005, 12:42   #10
Afrow UK
Moderator
 
Afrow UK's Avatar
 
Join Date: Nov 2002
Location: Surrey, England
Posts: 8,434
Use MUI_FINISHPAGE_RUN_FUNCTION...

code:
!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
Afrow UK is offline   Reply With Quote
Reply
Go Back   Winamp & Shoutcast Forums > Developer Center > NSIS Discussion

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump