title: Inno Setup - Registry uninsdeletekey - exclude upgrade
body: <p>I have an Inno-Setup installation with the following entry in the <code>[Registry]</code> section</p>
  
  <p><code>Root: HKCU; Subkey: SOFTWARE\MyCompany\MyApp; ValueName: MyKey; Flags: uninsdeletekey noerror</code></p>
  
  <p>Which as stated by the <em>flags</em> is to be deleted upon uninstall.</p>
  
  <p><strong>But</strong> I need it to be preserved in case the uninstall is due to version upgrade.</p>
  
  <p>How can it be done? <code>Check</code> maybe?</p>
  
  <p>Thanks.</p>