I understand why?
If I use
!define MUI_FINISHPAGE_RUN notepad.ex
it works, notepad starts
It I use
!define MUI_FINISHPAGE_RUN winword.exe
nothing happens
If I use in windows executing window winword.exe without path, ist starts !
Nsis mui_finishpage_run
7 posts
The run box is different from the NSIS environment. Try it in a cmd window, and you'll find it doesn't find winword.exe from there.
I suggest checking the registry for the full path, and define it that way. This should work:
I suggest checking the registry for the full path, and define it that way. This should work:
Of course, you should deal with the case where Word is not installed.ReadRegStr $0 HKLM "SOFTWARE\Microsoft\Windows\CurrentVersion\App Paths\Winword.exe" "Path"
!define MUI_FINISHPAGE_RUN "$0\Winword.exe"
I have just this reg entry used:
ReadRegStr $R9 HKCU Software\Microsoft\Office\15.0\Word\Options "PROGRAMDIR"
ReadRegStr $R9 HKCU Software\Microsoft\Office\15.0\Word\Options "PROGRAMDIR"
But that's a particular version of Word. You'd have to have more logic to determine which version is installed.
Are you sure you are checking in HKLM?
Are you sure you are checking in HKLM?
I already have logic to check the version anyway because I need other keys.
This is not correct, that path value is optional and can contain other paths. The default value in that key is supposed to have the full path to the exe.Originally Posted by Nutzzz View Post
I suggest checking the registry for the full path, and define it that way. This should work:ReadRegStr $0 HKLM "SOFTWARE\Microsoft\Windows\CurrentVersion\App Paths\Winword.exe" "Path"
!define MUI_FINISHPAGE_RUN "$0\Winword.exe"
Thanks for the clarification.Originally Posted by Anders View PostThis is not correct, that path value is optional and can contain other paths. The default value in that key is supposed to have the full path to the exe.