Archive: Labels in Macros


Labels in Macros
Okay I actually have 2 questions here:

1) Is there a way to successfully use labels in a macro that is called about 30 times in one section? I use the "IfFileExists" function in a macro and if the file exists it continues, if not I want it to jump to the done: section right before !macroend. However, in one of my sections, I call the macro 30 times, once for every file I'm trying to install. The compiler though gives me an error saying the label has already been defined the minute it hits the second macro.

I am using relative jumps right now, but there's like 25 lines to this macro and everytime I change it I hate having to count the lines I need to jump making sure not to count the lines that relative jumps don't consider,etc.


2) Is there a way to automatically jump to a certain page skipping the other pages based on say a certain condition? Like if i check the registry for a certain string and it doesn't match what I'm looking for, I'd like to display a message to the user, and when they hit okay it automatically selects a certain install type and jumps to the directory page?


  1. Append ${__LINE__} to the label name.
  2. Call Abort in the page's pre function to skip it.