|
@@ -74,6 +74,7 @@ var
|
74
|
74
|
i: Integer;
|
75
|
75
|
Reg: TRegistry;
|
76
|
76
|
handlerInfo: String;
|
|
77
|
+ profileDir: String;
|
77
|
78
|
deleteProtocol: boolean;
|
78
|
79
|
begin
|
79
|
80
|
if (ParamCount > 0) then begin
|
|
@@ -83,17 +84,21 @@ begin
|
83
|
84
|
InstallDir := trim(InstallDir);
|
84
|
85
|
KillDir(InstallDir);
|
85
|
86
|
hK32 := GetModuleHandle('kernel32');
|
|
87
|
+ profileDir := GetEnvironmentVariable('USERPROFILE');
|
|
88
|
+
|
86
|
89
|
if GetProcAddress(hK32, 'GetLocaleInfoEx') <> nil then begin
|
87
|
90
|
// Vista
|
88
|
91
|
KillDir(GetEnvironmentVariable('APPDATA')+'\Microsoft\Windows\Start Menu\Programs\DMDirc');
|
89
|
92
|
DeleteFile(GetEnvironmentVariable('USERPROFILE')+'\AppData\Roaming\Microsoft\Internet Explorer\Quick Launch\DMDirc.lnk');
|
90
|
93
|
DeleteFile(GetEnvironmentVariable('USERPROFILE')+'\Desktop\DMDirc.lnk');
|
|
94
|
+ profileDir := profileDir+'\AppData\Roaming\DMDirc';
|
91
|
95
|
end
|
92
|
96
|
else begin
|
93
|
97
|
// Not Vista
|
94
|
98
|
KillDir(GetEnvironmentVariable('USERPROFILE')+'\Microsoft\Windows\Start Menu\Programs\DMDirc');
|
95
|
|
- DeleteFile(GetEnvironmentVariable('USERPROFILE')+'\Application DataMicrosoft\Internet Explorer\Quick Launch\DMDirc.lnk');
|
|
99
|
+ DeleteFile(GetEnvironmentVariable('USERPROFILE')+'\Application Data\Microsoft\Internet Explorer\Quick Launch\DMDirc.lnk');
|
96
|
100
|
DeleteFile(GetEnvironmentVariable('USERPROFILE')+'\Desktop\DMDirc.lnk');
|
|
101
|
+ profileDir := profileDir+'\Application Data\DMDirc';
|
97
|
102
|
end;
|
98
|
103
|
// Remove irc:// handler if it is us.
|
99
|
104
|
deleteProtocol := false;
|
|
@@ -126,6 +131,12 @@ begin
|
126
|
131
|
Reg.CloseKey;
|
127
|
132
|
Reg.Free;
|
128
|
133
|
|
|
134
|
+ if (FileExists(profileDir+'\dmdirc.config')) then begin
|
|
135
|
+ if MessageBox(0, PChar('A dmdirc profile has been detected ('+profileDir+')'+#13#10+' Do you want to delete it aswell?'), 'DMDirc Uninstaller', MB_YESNO) = IDYES then begin
|
|
136
|
+ KillDir(profileDir);
|
|
137
|
+ end;
|
|
138
|
+ end;
|
|
139
|
+
|
129
|
140
|
MessageBox(0, PChar('DMDirc has been uninstalled from "'+InstallDir+'".'), 'DMDirc Uninstaller', MB_OK);
|
130
|
141
|
end
|
131
|
142
|
else begin
|