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?