- NSIS Discussion
- MUI_FINISHPAGE_RUN Problem
Archive: MUI_FINISHPAGE_RUN Problem
YsFred4
28th November 2002 02:11 UTC
MUI_FINISHPAGE_RUN Problem
I have an installer where the finish page run progam needs to have a parameter to run correctly. I have tried all of the combinations of ' and " and $\" and none of them work correctly. I can run the same command from an Exec command.
Joost Verburg
28th November 2002 09:54 UTC
The Modern UI already puts quotes around the whole string, to prevent problems on Win9x.
Try:
!define MUI_FINISHPAGE_RUN "Program.exe$\" $\"Parameter"
YsFred4
28th November 2002 11:24 UTC
The problem is that does some strnage things. It actually changed the parameter filename. Here is what the makeNSISW shows:
!define: "MUI_FINISHPAGE_RUN"="$INSTDIR\program.exe" "$INSTDIR\parameter.ysf8"
The final 8 is not what I have in the script. If I add a space after the ysf then the filename ends up being right, but it still does not work. In either case the My Computer comes up and not the application.
Joost Verburg
28th November 2002 15:27 UTC
Because you can also use Language Strings, the Modern UI copies the value to a variable and adds quotes.
Did you try my code?
YsFred4
28th November 2002 15:34 UTC
Yep. the posting is the result that the makeNSISW window shows when I used your code. Here is the code that I used:
!define MUI_FINISHPAGE_RUN "$INSTDIR\program.exe$\" $\"$INSTDIR\${SHORTNAME}.ysf"
All it does is bring up explorer at the My Computer level.
Joost Verburg
28th November 2002 15:41 UTC
I think I found the bug. Wait a sec, I'll upload a new version.
edit: Ok, done. Note that you also have download the latest NSIS source and recompile NSIS, because of another related bug :)
YsFred4
28th November 2002 16:19 UTC
Well I tried it out and it is still not working. I put a MessageBox in teh system script file to see what it was trying to execute and it showed an empty string. I have to get going now, but I hope that we can figure this out soon.
kichik
28th November 2002 16:45 UTC
It's working. I double checked it. Use the latest version from CVS. You will have to recompile makensis because there are some other stuff in progress so I couldn't upload a copmiled version.
Hmm... Well, at least my part of the bug ;)
YsFred4
28th November 2002 19:15 UTC
Thanks. I will give it a shot when I get back home.
YsFred4
29th November 2002 12:49 UTC
Well I made 1 change to the system.nsh file to get it to work now.
StrCpy ${MUI_TEMP1} '${MUI_FINISHPAGE_RUN}'
Using the single quotes there instead of the double quotes fixed my issue. Plus the other one that you fixed to have it not put extra characters in help alot too.
Joost Verburg
29th November 2002 16:56 UTC
That means that you are using double quotes in your string. You should escape 'em all using $\".
YsFred4
30th November 2002 03:40 UTC
This is my exact string... no edits.
!define MUI_FINISHPAGE_RUN "$INSTDIR\clockdown.exe$\" $\"$INSTDIR\${SHORTNAME}.ysf"
This does not work unless I make the system change. As you can see they are escapes. I think that the fact that the string goes thru a StrCpy and then the Exec might have something to do with it. It works now, so I am not too worried.
Joost Verburg
6th December 2002 12:20 UTC
When parsing the defines, the compiler already converts the escapes. I think that should be changed.
YsFred4
6th December 2002 15:05 UTC
Glad to hear why its doing it. I love the look and feel of the modern UI. I keep releasing new products about every week or two with it. With over 85K downloads in the last 7 months, there have been no complaints of NSIS at all.
Joost Verburg
6th December 2002 15:43 UTC
An updated version of the Modern UI with an additional define for parameters will be uploaded soon.
Joost Verburg
6th December 2002 16:54 UTC
Done :D Please check it, because beta 0 will be realeased today :)
YsFred4
6th December 2002 18:30 UTC
When is the release? I might not be able to get to it until about 7-8pm EST. If I need to check sooner I can, just need to know.
Joost Verburg
6th December 2002 18:43 UTC
It will be released in about an hour. But it's ok, I've tested it :D
YsFred4
6th December 2002 18:52 UTC
Ok. Thanks for all the work Joost.
YsFred4
7th December 2002 02:53 UTC
It works great now. Thanks.