title: Inno Setup clean uninstall not possible with shell extensions
body: <p>I'm using Inno Setup 6.0.5 and I register two shell extension DLLs which are similar to the ones from <a href="https://github.com/owncloud/client/tree/master/shell_integration/windows" rel="nofollow noreferrer">ownCloud</a>. One DLL registers a dynamic context menu, another DLL adds overlay icons.</p>
  <p>I'm using the facilities Inno Setup provides to do this step. That means:</p>
  <pre><code>[Setup]
  ChangesAssociations=true
  ChangesEnvironment=true
  
  [Files]
  ...
  Source: &quot;shell-integration\*&quot;; DestDir: &quot;{app}\shell-integration&quot;; Flags: regserver 64bit; Check: IsAdminInstallMode;
  </code></pre>
  <p>What I observe is the following:</p>
  <ul>
  <li>After the setup finished, the overlay icons are not active. They only are once I force-restart explorer.exe manually. There are sources like <a href="https://superuser.com/a/1391142/223119">this</a> which claim that this is possible by calling <code>SHChangeNotify</code> and <code>SendMessageTimeoutW</code>, but they are obviously wrong, since I am doing exactly that (see <code>ChangesAssociations</code> and <code>ChangesEnvironment</code> which are supposed to do this).</li>
  <li>After uninstalling, the app directory is not deleted, because the 2 DLLs files are still locked. This also inhibits updating my application. Inno Setup is supposed to detect locked files and offer to close the apps that lock them, but that mechanism doesn't seem to work... Also, <code>uninsrestartdelete</code> flag is of no use, as this causes Inno Setup to delete the files only after a reboot, but I don't want to force the user to restart the machine in case they upgrade the application.</li>
  </ul>
  <p>What am I supposed to do? The only solution I see is to do everything myself, and not rely on <code>[Files]</code> and <code>regserver</code> flag. Especially the uninstallation requires to first unregister the DLL, then force-restart explorer.exe, then actually delete the files and folders. I would do this in <code>CurUninstallStepChanged</code> in the <code>if CurUninstallStep = usUninstall</code> block. And to restart explorer.exe I would modify <code>CurStepChanged</code> in the <code>if (CurStep = ssDone)</code> block.</p>