|
@@ -1,31 +1,31 @@
|
1
|
1
|
{*
|
2
|
|
- * DMDirc Uninstaller
|
3
|
|
- *
|
4
|
|
- * This application launches DMDirc on windows and passes control to the
|
5
|
|
- * update engine as necessary.
|
6
|
|
- *
|
7
|
|
- * DMDirc - Open Source IRC Client
|
8
|
|
- * Copyright (c) 2006-2010 Chris Smith, Shane Mc Cormack, Gregory Holmes,
|
9
|
|
- * Michael Nixon
|
10
|
|
- *
|
11
|
|
- * Permission is hereby granted, free of charge, to any person obtaining a copy
|
12
|
|
- * of this software and associated documentation files (the "Software"), to deal
|
13
|
|
- * in the Software without restriction, including without limitation the rights
|
14
|
|
- * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
15
|
|
- * copies of the Software, and to permit persons to whom the Software is
|
16
|
|
- * furnished to do so, subject to the following conditions:
|
17
|
|
- *
|
18
|
|
- * The above copyright notice and this permission notice shall be included in
|
19
|
|
- * all copies or substantial portions of the Software.
|
20
|
|
- *
|
21
|
|
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
22
|
|
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
23
|
|
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
24
|
|
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
25
|
|
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
26
|
|
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
27
|
|
- * SOFTWARE.
|
28
|
|
- *}
|
|
2
|
+ * DMDirc Uninstaller
|
|
3
|
+ *
|
|
4
|
+ * This application launches DMDirc on windows and passes control to the
|
|
5
|
+ * update engine as necessary.
|
|
6
|
+ *
|
|
7
|
+ * DMDirc - Open Source IRC Client
|
|
8
|
+ * Copyright (c) 2006-2010 Chris Smith, Shane Mc Cormack, Gregory Holmes,
|
|
9
|
+ * Michael Nixon
|
|
10
|
+ *
|
|
11
|
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
12
|
+ * of this software and associated documentation files (the "Software"), to deal
|
|
13
|
+ * in the Software without restriction, including without limitation the rights
|
|
14
|
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
15
|
+ * copies of the Software, and to permit persons to whom the Software is
|
|
16
|
+ * furnished to do so, subject to the following conditions:
|
|
17
|
+ *
|
|
18
|
+ * The above copyright notice and this permission notice shall be included in
|
|
19
|
+ * all copies or substantial portions of the Software.
|
|
20
|
+ *
|
|
21
|
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
22
|
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
23
|
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
24
|
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
25
|
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
26
|
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
27
|
+ * SOFTWARE.
|
|
28
|
+ *}
|
29
|
29
|
program Uninstaller;
|
30
|
30
|
{$IFDEF FPC}
|
31
|
31
|
{$MODE Delphi}
|
|
@@ -61,8 +61,8 @@ procedure InitCommonControls; stdcall; External 'comctl32.dll' name 'InitCommonC
|
61
|
61
|
{ ---------------------------------------------------------------------------- }
|
62
|
62
|
|
63
|
63
|
{ ----------------------------------------------------------------------------
|
64
|
|
- Create a temp directory and return the path to it
|
65
|
|
- ---------------------------------------------------------------------------- }
|
|
64
|
+ Create a temp directory and return the path to it
|
|
65
|
+ ---------------------------------------------------------------------------- }
|
66
|
66
|
function GetTempDirectory(): String;
|
67
|
67
|
var
|
68
|
68
|
buf: array[0..MAX_PATH] of Char;
|
|
@@ -80,8 +80,8 @@ begin
|
80
|
80
|
end;
|
81
|
81
|
|
82
|
82
|
{ ----------------------------------------------------------------------------
|
83
|
|
- Delete a directory and all files it contains
|
84
|
|
- ---------------------------------------------------------------------------- }
|
|
83
|
+ Delete a directory and all files it contains
|
|
84
|
+ ---------------------------------------------------------------------------- }
|
85
|
85
|
function KillDir(Dir: string): Integer;
|
86
|
86
|
var
|
87
|
87
|
searchResult: TSearchRec;
|
|
@@ -112,8 +112,8 @@ begin
|
112
|
112
|
end;
|
113
|
113
|
|
114
|
114
|
{ ----------------------------------------------------------------------------
|
115
|
|
- MAIN PROGRAM
|
116
|
|
- ---------------------------------------------------------------------------- }
|
|
115
|
+ MAIN PROGRAM
|
|
116
|
+ ---------------------------------------------------------------------------- }
|
117
|
117
|
var
|
118
|
118
|
TempDir: String;
|
119
|
119
|
InstallDir: String = '';
|
|
@@ -141,7 +141,7 @@ begin
|
141
|
141
|
end
|
142
|
142
|
else begin
|
143
|
143
|
// Not Vista
|
144
|
|
- KillDir(GetEnvironmentVariable('USERPROFILE')+'\Microsoft\Windows\Start Menu\Programs\DMDirc');
|
|
144
|
+ KillDir(GetEnvironmentVariable('USERPROFILE')+'\Start Menu\Programs\DMDirc');
|
145
|
145
|
DeleteFile(GetEnvironmentVariable('USERPROFILE')+'\Application Data\Microsoft\Internet Explorer\Quick Launch\DMDirc.lnk');
|
146
|
146
|
DeleteFile(GetEnvironmentVariable('USERPROFILE')+'\Desktop\DMDirc.lnk');
|
147
|
147
|
profileDir := profileDir+'\Application Data\DMDirc';
|