Old 2nd February 2009, 00:20   #1
ghillerson
Junior Member
 
Join Date: Jan 2009
Posts: 5
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
ghillerson is offline   Reply With Quote
Old 2nd February 2009, 05:14   #2
Animaether
Major Dude
 
Join Date: Jun 2001
Posts: 1,173
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);

Quote:
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...
code:

!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
Animaether is offline   Reply With Quote
Old 3rd February 2009, 02:13   #3
ghillerson
Junior Member
 
Join Date: Jan 2009
Posts: 5
Thank you!
ghillerson 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