Archive: calling word from mui_finishpage_run


calling word from mui_finishpage_run
This works in my installer, opening a new Word document:

!define MUI_FINISHPAGE_RUN "C:\Program Files\Microsoft Office\Office12\Winword.exe"

But what I really want is for word to create a new document based on my own template. This command works fine from a command prompt window:

"C:\Program Files\Microsoft Office\Office12\Winword.exe" /z"C:\Program Files\MyApp\MyTemplate.dotm"

So I tried several variations of trying to pass the template name to word from my installer, but Word doesn't open for any of them, e.g.:

!define MUI_FINISHPAGE_RUN "C:\Program Files\Microsoft Office\Office12\Winword.exe /z'C:\Program Files\MyApp\MyTemplate.dotm'"

Is there a problem passing flags to a program, or is there some quotation issue that I don't understand here?

Any help appreciated.

Thanks,
gary


you have to separate the command (winword.exe) from the parameters (/z"etc." - btw, you may have to use double " for quotes in parameters as most windows applications don't accept single ' quotes);

MUI_FINISHPAGE_RUN exe_file
Application which the user can select to run using a checkbox. You don't need to put quotes around the filename when it contains spaces.

MUI_FINISHPAGE_RUN_PARAMETERS parameters
Parameters for the application to run. Don't forget to escape double quotes in the value (use $\").
so...

!define MUI_FINISHPAGE_RUN "C:\Program Files\Microsoft Office\Office12\Winword.exe"
!define MUI_FINISHPAGE_RUN_PARAMETERS '/z"C:\Program Files\MyApp\MyTemplate.dotm"'

...something like that. Can't test here due to no Word on this machine :)

Thank you!