1

Inno Setup isn't deleting the full registry key. Here is what I have done:

[Registry]
Root: HKLM; SubKey: SOFTWARE\EA Games\Need for Speed Most Wanted-2012; ValueType: string; ValueName: GDFBinary; ValueData: {app}\GDFBinary_en_US.dll; Flags: uninsdeletekey
Root: HKLM; SubKey: SOFTWARE\EA Games\Need for Speed Most Wanted-2012; ValueType: string; ValueName: DisplayName; ValueData: Need for Speed Most Wanted-2012; Flags: uninsdeletekey
Root: HKLM; SubKey: SOFTWARE\EA Games\Need for Speed Most Wanted-2012; ValueType: string; ValueName: Locale; ValueData: en_US; Flags: uninsdeletekey
Root: HKLM; SubKey: SOFTWARE\EA Games\Need for Speed Most Wanted-2012; ValueType: string; ValueName: Install Dir; ValueData: {app}; Flags: uninsdeletekey

These part isn't deleting when uninstalling: \EA Games\Need for Speed Most Wanted-2012 folder in registry

Root: HKLM; SubKey: SOFTWARE\EA Games\Need for Speed Most Wanted-2012 

(Need for Speed Most Wanted-2012 game is only for hint).

Anybody please help.

Kushal
  • 605
  • 8
  • 29

2 Answers2

3

Your code, as it is, automatically deletes the HKLM\SOFTWARE\EA Games\Need for Speed Most Wanted-2012. The HKLM\SOFTWARE\EA Games is not deleted.

If you want to delete even the HKLM\SOFTWARE\EA Games, you have to add an explicit code for it:

Root: HKLM; SubKey: SOFTWARE\EA Games; Flags: uninsdeletekeyifempty

(This should be placed before your other entries).

The entry will delete only empty key SOFTWARE\EA Games. If other subkeys are created (not by the installer), the key won't be deleted. If you want to delete the EA Games key unconditionally, replace uninsdeletekeyifempty with uninsdeletekey.

Martin Prikryl
  • 188,800
  • 56
  • 490
  • 992
  • I know it is correct, I just want to delete that `HKLM\SOFTWARE\EA Games` Part automatically.Is it possible with inno setup? – Kushal Jun 13 '15 at 06:51
  • You refer to `Need for Speed Most Wanted-2012` is your question. Please correct it. As it is now, it's pretty unclear what the problem is. – Martin Prikryl Jun 13 '15 at 07:00
  • I just tried and it worked so i have to just put the apppublisher before all the keys. I have one more question is this Processes will delete all the subfolder inside it.I need them deleted too.Thanks i will make the question as answered . – Kushal Jun 13 '15 at 07:36
  • Thanks thats what i wanted.@ Martin Prikryl 1 . – Kushal Jun 13 '15 at 10:27
  • Thanks for solving my problem.@ Martin Prikryl 1 .Now i am fully satisfied. – Kushal Jun 13 '15 at 10:31
0

Some time after installing software if we apply any offline patch in such case previous un-installer got replaced by new. so in such case we have to remove these registry key manually as follows:

usDone: 
   begin
       if RegKeyExists(HKEY_LOCAL_MACHINE, 'SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\{078ABE12-583D-43e6-96D6-5D092883DC82}_is1') then
       begin
         RegDeleteKeyIncludingSubkeys(HKEY_LOCAL_MACHINE, 'SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\{078ABE12-583D-43e6-96D6-5D092883DC82}_is1');
      end;
Martin Prikryl
  • 188,800
  • 56
  • 490
  • 992