Archive: MUI_FINISHPAGE_RUN Problem


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.


The Modern UI already puts quotes around the whole string, to prevent problems on Win9x.

Try:


!define MUI_FINISHPAGE_RUN "Program.exe$\" $\"Parameter"

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.

Because you can also use Language Strings, the Modern UI copies the value to a variable and adds quotes.

Did you try my code?


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.

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 :)


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.


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 ;)


Thanks. I will give it a shot when I get back home.


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.

That means that you are using double quotes in your string. You should escape 'em all using $\".


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.

When parsing the defines, the compiler already converts the escapes. I think that should be changed.


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.


An updated version of the Modern UI with an additional define for parameters will be uploaded soon.


Done :D Please check it, because beta 0 will be realeased today :)


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.


It will be released in about an hour. But it's ok, I've tested it :D


Ok. Thanks for all the work Joost.


It works great now. Thanks.