1

I use Inno Setup to install an Access database. It adds some registry keys, mainly trusted locations, which are removed during uninstall. This has always worked when uninstalling from the Control Panel - Programs and Features. It still works this way under Windows 10. Howeverm, it does NOT work when uninstalling under Windows 10 using Settings - Apps & Features. Any idea why and how to fix this? Oscar.

Root: HKCU; Subkey: "Software\Microsoft\Office\12.0\Access\Security\Trusted Locations\PLAMES"; valuetype: string; valuename: "Path"; valuedata: "{app}\"; Flags: createvalueifdoesntexist uninsdeletekey

Edit1. In addition to Registry Entries not being removed, the uninstall process also optionally deletes some directories. The same issue: under Windows 10 this works fine when uninstalling from the Control Panel - Programs and Features, but does not work when installing from Settings - Apps and Features. The code for optionally removing the directories:

[Code]
procedure CurUninstallStepChanged(CurUninstallStep: TUninstallStep);
var Entry: String;
begin
//If we reached the post uninstall step (uninstall succeeded), then...
    if CurUninstallStep = usPostUninstall then
    begin
//Ask about uninstalling the data folder in My Documents.
        if MsgBox(ExpandConstant('{cm:UninstallFolders}'), mbInformation, MB_YesNo) = idYes then
//Delete the folder.
        begin
            Entry := ExpandConstant('{userdocs}') + '\PlaMES Datafile\';
            if DirExists(Entry) then begin
                DelTree(Entry, true, true, true);
            end;
        end;
    end;
end;

Edit2. It seems to me the issue is not in Inno Setup, but the in way Windows 10 handles uninstall. This may or may not be limited to Inno Setup as installer. Sorry if that means I tagged poorly. What I find inexplicable: (1) when uninstalling using Control Panel - Programs and Features everything works as it should, the software/database is removed, registry entires are removed, directories are removed; (2) when uninstalling using Setting - Apps & Features, the software/database is removed, but registry entries are not removed, and directories are not removed. Why? Does Windows 10 have two different uninstall methods?

Oscar
  • 23
  • 5
  • 1) I do not think that your question title summarizes your problem. 2) Show us log files from both ways to uninstall the software (using the latest version of Inno Setup). – Martin Prikryl Apr 10 '19 at 15:07
  • Yes, using the latest Inno Setup 5.6.1 (u). – Oscar Apr 10 '19 at 17:21
  • What is the value of `PrivilegesRequired`? – Martin Prikryl Apr 11 '19 at 05:15
  • PriviligesRequired = lowest. – Oscar Apr 11 '19 at 11:10
  • That's an important information. It should be in the question, not in a comment. + You still didn't post the logs. – Martin Prikryl Apr 11 '19 at 11:24
  • Hi Martin, where would I get these logs from? – Oscar Apr 12 '19 at 12:10
  • The uninstaller have `/log` command-line switch. Add it to the `UninstallString` value of `HKCU\Software\Microsoft\Windows\CurrentVersion\Uninstall\your program` key. – Martin Prikryl Apr 12 '19 at 12:56
  • The log files are almost identical: the only noticeable difference is that uninstalling via the control panel (which works properly) has User privileges: None, while uninstalling via Settings (which does not work properly) has User privileges: Administrative. Counterintuitive. – Oscar Apr 15 '19 at 15:32
  • Seems to be a bug in Windows 10: https://stackoverflow.com/q/35469595/850848 – Martin Prikryl Apr 15 '19 at 15:55
  • Thanks for the link - seems to be the answer though not what I wanted to hear. Especially because basic Windows 10 users now easily access Settings but not the Control Panel. – Oscar Apr 16 '19 at 16:15
  • @Oscar You just type Con in the search box and Control Panel is the first item in the list. Really easy. (off topic). – Andrew Truckle Apr 16 '19 at 19:55
  • Martin, to me this question has been answered - but I do not seem to have any way to flag that, if that's the right thing to do now. – Oscar Apr 17 '19 at 14:59
  • OK, I'm closing it as a duplicate. – Martin Prikryl Apr 17 '19 at 15:07

0 Answers0