title: How do I create a "just for me" install for an admin user?
body: <p>When I run my install script as an admin user, it puts the start menu entries in the "All Users" profile.  I want the start menu entries to be placed in the current user's profile if they are an admin user and choose to install "Just for me".  </p>
  
  <p>I can do it by selecting one of two values for a #define, but I can't figure out how to create a constant that is conditionally included.  I already have a [Code] section routine that returns true if a "Just for me" install has been chosen.  Here's the scenario:</p>
  
  <pre><code>#define StartMenuLocation = "{somegroup}"     ; check JustForMeInstall
  #define StartMenuLocation = "{anothergroup}"  ; check AllUsersInstall
  ...
  
  [Icons]
  Name: "{#StartMenuLocation}\{#MyAppName}" ; Filename: "{app}\{#ExeName}" ; parameters: "{#CommandArgs}" ; comment: "Starts {#MyAppName} {#MyAppVersion}"
  ...
  
  [Code]
  
  function JustMeInstall  : boolean ;
  begin
  Result := (InstallationType = itJustMe) ;
  end ;
  
  function AllUsersInstall: boolean ;
  begin
  Result := (InstallationType = itAllUsers) ;
  end ;
  </code></pre>
  
  <p>where the "check" parameters for the #defines are not supported and of course ignored.</p>
  
  <p>So two questions really:</p>
  
  <ul>
  <li><p>what constants do I use to define the start menu folder location. - InnoSetup provides <code>{group}</code>, but this folder is created under the All Users profile unless the user installing the application does not have administrative privileges, in which case it is created in the user's profile.  I want a constant for the current user start menu folder that works when that user is logged in as an admin user.</p></li>
  <li><p>how do you implement the conditional #defines as shown above (of general interest outside this problem anyway).</p></li>
  </ul>