GFORCE100
23rd November 2004 00:48 UTC
Quick launch control
This should be a simple question hopefully.
I want to ask the user if they want a quick launch shortcut created. How do I make the message box only pop-up when the shortcut page is showing? Currently it pops up when the installer is installer files which is too early.
Many thanks
Afrow UK
23rd November 2004 09:53 UTC
Shortcut page? Do you mean Finish page?
You could put it in Function .onInstSuccess so then it is called when installaation succeeds...
-Stu
GFORCE100
23rd November 2004 20:19 UTC
Originally posted by Afrow UK
Shortcut page? Do you mean Finish page?
You could put it in Function .onInstSuccess so then it is called when installaation succeeds...
-Stu
You know on the page where it allows to make start menu shortcuts.
Ideally if when a user clicks "next" there it would popup and ask them then.
From what I read .onInstSuccess means it will popup after the installer closes making it more suitable to a readme type question.
Afrow UK
23rd November 2004 20:49 UTC
Ah right, in that case (if you are using MUI):
!define MUI_PAGE_CUSTOMFUNCTION_LEAVE PromptQLShortcut
!insertmacro MUI_PAGE_STARTMENU ... ...
Function PromptQLShortcut
MessageBox MB_YESNO|MB_ICONQUESTION ...
FunctionEnd
-Stu
GFORCE100
23rd November 2004 20:57 UTC
Originally posted by Afrow UK
Ah right, in that case (if you are using MUI):
!define MUI_PAGE_CUSTOMFUNCTION_LEAVE PromptQLShortcut
!insertmacro MUI_PAGE_STARTMENU ... ...
Function PromptQLShortcut
MessageBox MB_YESNO|MB_ICONQUESTION ...
FunctionEnd
-Stu
Right so just to be sure I put the code in the right order what is below is entirely external to the Installer section right?
Function PromptQLShortcut
MessageBox MB_YESNO|MB_ICONQUESTION ...
FunctionEnd
Also is the below supposed to be one line?
!define MUI_PAGE_CUSTOMFUNCTION_LEAVE PromptQLShortcut
!insertmacro MUI_PAGE_STARTMENU ... ...
I'm a little confused what !insertmacro MUI_PAGE_STARTMENU ... ...
does and where would that line be put....
Afrow UK
23rd November 2004 21:08 UTC
Yes it is all outside of Sections and Functions (as you cannot place Functions inside other Functions or Sections).
You should already have
!insertmacro MUI_PAGE_STARTMENU ... ...
in your script. You just need to append your current script with this.
-Stu
GFORCE100
23rd November 2004 21:23 UTC
Works great now thanks.....
Just one more question, assuming a user chooses not to make a quick luanch shortcut is there any harm if we delete a non existing link within the uninstaller?
In other words should we add some kind of stored setting indiciating if the uninstaller needs to delete it later?
deritrus
23rd November 2004 22:00 UTC
Originally posted by GFORCE100
In other words should we add some kind of stored setting indiciating if the uninstaller needs to delete it later?
No, you don't need to store a setting. There is no harm in trying to delete a file that doesn't exist. The error flag
will not be set.
GFORCE100
23rd November 2004 22:05 UTC
Okay so it's just like in Windows, thaks.
Afrow UK
24th November 2004 14:10 UTC
For future reference you can simply use:
IfFileExists "$QUICKLAUNCH\MyApp.lnk" 0 +2
Delete "$QUICKLAUNCH\MyApp.lnk"
But as deritrus says, you don't really have to check whether it exists or not.
-Stu