I have an installer that is re-configurable, so that if there is a component you didn't install the first time, you may re-open the installer to add that component to the install later.
The components you install, will then not be available in the installer afterwords, but will then turn up in the uninstaller, and vice versa.
All of that works already, so that's not my question.
My question is:
It's a little cumbersome when people re-open the installer, that they have to go through the Welcome page, License page(and check a check box), and Directory page, in order to get to the Components page to install components they didn't install the first time.
So I was wondering if there is a way to look up a registry key, and if it's present, skip all those pages and go directly to the components page?
I have found some pseudo script examples here on how to skip one page, but I'd like to skip three.
I'm not too good at understanding pseudo script and getting something working from it either.
Thanks in advance.
Skip several pages
3 posts
In the page Pre function you need to call Abort. You could call Abort in all 3 page's Pre functions if a condition is true (e.g. $R0 == 1)
-Stu
-Stu
Yes!
It works! Wohoo! 🙂
If anyone else reads this and wonders how I did it, I'll post an example below:
First, the function:
Then you simply put the PRE function define above each of the page macros you want to skip, like this:
Thanks for the help, both here and in other threads. 🙂
It works! Wohoo! 🙂
If anyone else reads this and wonders how I did it, I'll post an example below:
First, the function:
(the registry key is probably different in your case, I just changed mine slightly for this example)
Function SkipPages
ReadRegStr $1 HKLM \
"Software\Microsoft\Windows\CurrentVersion\Uninstall\AppName" \
"UninstallString"
StrCmp $1 "" done
Abort
done:
FunctionEnd
Then you simply put the PRE function define above each of the page macros you want to skip, like this:
It works here.
!define MUI_PAGE_CUSTOMFUNCTION_PRE SkipPages
!insertmacro MUI_PAGE_WELCOME
!define MUI_PAGE_CUSTOMFUNCTION_PRE SkipPages
!insertmacro MUI_PAGE_LICENSE "ReadMe.rtf"
!define MUI_PAGE_CUSTOMFUNCTION_PRE SkipPages
!insertmacro MUI_PAGE_DIRECTORY
!insertmacro MUI_PAGE_COMPONENTS
!insertmacro MUI_PAGE_INSTFILES
!insertmacro MUI_PAGE_FINISH
Thanks for the help, both here and in other threads. 🙂