title: Hiding NSIS Dialog
body: <p>I am new to NSIS so bear with me:</p>
  
  <p>I am using NSIS (legacy code...) for making sure that .NET is installed before launching a .NET application.  </p>
  
  <p>If it is not installed, I am installing it for the user, but I would prefer getting user's approval before playing hooky with his system.</p>
  
  <p>I was able to display the message to the user:  </p>
  
  <p><img src="https://i.stack.imgur.com/fMHXT.jpg" alt="enter image description here"></p>
  
  <p>using this code:</p>
  
  <pre><code>WriteIniStr $MissingItemsIniFilename 'Field 2' 'State' '$R2'
  WriteIniStr $MissingItemsIniFilename 'Settings' 'CancelEnabled' 1
  
  
  InstallOptions::Dialog $MissingItemsIniFilename
  Pop $1 ;get button action
  </code></pre>
  
  <p>my problem is that after user clicks <code>Next</code> the "dialog" is not closing and shows:  </p>
  
  <p><img src="https://i.stack.imgur.com/SYTAR.jpg" alt="enter image description here"></p>
  
  <p>So my question is, How can I close the dialog? </p>
  
  <p>Extra information:<br>
  I am using InstallOptions for showing the dialog.<br>
  I looked into nsDialogs but could not find there a solution that worked for me (might be due to lack of experience in NSIS).</p>
  
  <p>Please let me know if any other information is required...</p>