File tree Expand file tree Collapse file tree 2 files changed +20
-1
lines changed Expand file tree Collapse file tree 2 files changed +20
-1
lines changed Original file line number Diff line number Diff line change 25
25
!macroend
26
26
27
27
28
+ ; ----------------------------------------
29
+ ; Removes a registry key if there is only one subkey with particular name present.
30
+ ; IN ROOT_KEY: A root key like HKLM
31
+ ; IN GROUP_KEY: Any group key with subkeys
32
+ ; IN SUBKEY: Name of the subkey to check against
33
+ ; ----------------------------------------
34
+ !macro _RemoveRegistryGroupWithSingleKey ROOT_KEY GROUP_KEY SUBKEY
35
+ Push $0
36
+ EnumRegKey $0 ${ROOT_KEY} " ${GROUP_KEY}" 0
37
+ StrCmp $0 " ${SUBKEY}" 0 +4
38
+ EnumRegKey $0 ${ROOT_KEY} " ${GROUP_KEY}" 1
39
+ StrCmp $0 " " 0 +2
40
+ DeleteRegKey ${ROOT_KEY} " ${GROUP_KEY}"
41
+ Pop $0
42
+ !macroend
43
+ !define RemoveRegistryGroupWithSingleKey ` !insertmacro _RemoveRegistryGroupWithSingleKey`
44
+
45
+
28
46
; ----------------------------------------
29
47
; In: FILENAME = filename
30
48
; Out: MAJOR.MINOR.RELEASE.BUILD
Original file line number Diff line number Diff line change @@ -1143,7 +1143,8 @@ Section Uninstall
1143
1143
DeleteRegKey HKLM " SOFTWARE\Multi Theft Auto: San Andreas ${0.0}"
1144
1144
DeleteRegKey HKCU " SOFTWARE\Multi Theft Auto: San Andreas ${0.0}"
1145
1145
DeleteRegKey HKLM " SOFTWARE\Multi Theft Auto: San Andreas All\${0.0}"
1146
- ; TODO if HKLM "SOFTWARE\Multi Theft Auto: San Andreas All\Common is the only one left, delete it
1146
+ ; Delete "SOFTWARE\Multi Theft Auto: San Andreas All" if "Common" is the only one left.
1147
+ ${RemoveRegistryGroupWithSingleKey} HKLM " SOFTWARE\Multi Theft Auto: San Andreas All" " Common"
1147
1148
1148
1149
${GameExplorer_RemoveGame} ${GUID}
1149
1150
You can’t perform that action at this time.
0 commit comments