View difference between Paste ID: mZJZvZL9 and tesGYZga
SHOW: | | - or go back to the newest paste.
1
!include x64.nsh
2
OutFile TIB-ShellEx-11.5.38573.exe
3
4
Name "Acronis Shell Extension only"
5
BrandingText ":: Nomadic ::"
6
7
CRCCheck on
8
SetOverwrite ifnewer
9
ShowInstDetails show
10
11
DirText "Based on Acronis Backup v11.5.38573"
12
13
Page directory
14
Page components
15
Page instfiles
16
17
Var InstDir32
18
Var InstDir64
19
20
Section "!Required files" required_id
21
	WriteRegStr HKEY_CLASSES_ROOT ".tib" "" "tibfile"
22
	WriteRegStr HKEY_CLASSES_ROOT "tibfile" "" "Acronis True Image Backup Archive"
23
	WriteRegStr HKEY_CLASSES_ROOT "tibfile\CLSID" "" "{C539A15B-3AF9-4c92-B771-50CB78F5C751}"
24
	WriteRegStr HKEY_CLASSES_ROOT "tibfile\DefaultIcon" "" "$INSTDIR\tishell_abr.dll,0"
25
	WriteRegStr HKEY_CLASSES_ROOT "tibfile\Shell" "" ""
26
	WriteRegStr HKEY_CLASSES_ROOT "tibfile\Shell\open" "" ""
27
	WriteRegStr HKEY_CLASSES_ROOT "tibfile\Shell\open\command" "" "explorer /idlist,%I,%L"
28
	WriteRegStr HKEY_CLASSES_ROOT "tibfile\Shell\open\ddeexec" "NoActivateHandler" ""
29
	WriteRegStr HKEY_CLASSES_ROOT "tibfile\Shell\open\ddeexec" "" "[ViewFolder($\"%l$\", %I, %S)]"
30
	WriteRegStr HKEY_CLASSES_ROOT "tibfile\Shell\open\ddeexec\application" "" "Folders"
31
	WriteRegStr HKEY_CLASSES_ROOT "tibfile\Shell\open\ddeexec\ifexec" "" "[]"
32
	WriteRegStr HKEY_CLASSES_ROOT "tibfile\Shell\open\ddeexec\topic" "" "AppProperties"
33
	WriteRegStr HKEY_CLASSES_ROOT "tibfile\ShellEx" "" ""
34
	WriteRegStr HKEY_CLASSES_ROOT "tibfile\ShellEx\ContextMenuHandlers" "" ""
35
	WriteRegStr HKEY_CLASSES_ROOT "tibfile\ShellEx\ContextMenuHandlers\{C539A15A-3AF9-4c92-B771-50CB78F5C751}" "" ""
36
	${If} ${RunningX64}
37
		DetailPrint "Installer running on 64-bit host"
38
		; disable registry redirection (enable access to 64-bit portion of registry)
39
		SetRegView 64
40
		WriteRegStr HKEY_CLASSES_ROOT "CLSID\{C539A15A-3AF9-4c92-B771-50CB78F5C751}" "" ""
41
		WriteRegStr HKEY_CLASSES_ROOT "CLSID\{C539A15A-3AF9-4c92-B771-50CB78F5C751}\InProcServer32" "" "$INSTDIR\tishell64.dll"
42
		WriteRegStr HKEY_CLASSES_ROOT "CLSID\{C539A15A-3AF9-4c92-B771-50CB78F5C751}\InProcServer32" "ThreadingModel" "Apartment"
43
		WriteRegStr HKEY_CLASSES_ROOT "CLSID\{C539A15B-3AF9-4c92-B771-50CB78F5C751}" "" ""
44
		WriteRegStr HKEY_CLASSES_ROOT "CLSID\{C539A15B-3AF9-4c92-B771-50CB78F5C751}\Implemented Categories" "" ""
45
		WriteRegStr HKEY_CLASSES_ROOT "CLSID\{C539A15B-3AF9-4c92-B771-50CB78F5C751}\Implemented Categories\{00021490-0000-0000-C000-000000000046}" "" ""
46
		WriteRegStr HKEY_CLASSES_ROOT "CLSID\{C539A15B-3AF9-4c92-B771-50CB78F5C751}\InProcServer32" "" "$INSTDIR\tishell64.dll"
47
		WriteRegStr HKEY_CLASSES_ROOT "CLSID\{C539A15B-3AF9-4c92-B771-50CB78F5C751}\InProcServer32" "ThreadingModel" "Apartment"
48
		WriteRegDWORD HKEY_CLASSES_ROOT "CLSID\{C539A15B-3AF9-4c92-B771-50CB78F5C751}\ShellFolder" "Attributes" 0xa0000000
49
		WriteRegStr HKEY_CLASSES_ROOT "CLSID\{C539A15C-3AF9-4c92-B771-50CB78F5C751}" "" "Acronis True Image Shell Extension Backend"
50
		WriteRegStr HKEY_CLASSES_ROOT "CLSID\{C539A15C-3AF9-4c92-B771-50CB78F5C751}" "AppID" "{C4E69DB9-E094-483e-B922-E7ADE65FB497}"
51
		WriteRegStr HKEY_CLASSES_ROOT "CLSID\{C539A15C-3AF9-4c92-B771-50CB78F5C751}\InProcServer32" "ThreadingModel" "Apartment"
52
		WriteRegStr HKEY_CLASSES_ROOT "CLSID\{C539A15C-3AF9-4c92-B771-50CB78F5C751}\InProcServer32" "" "$INSTDIR\tishell_svr64.dll"
53
		WriteRegStr HKEY_CLASSES_ROOT "CLSID\{C539A15D-3AF9-4c92-B771-50CB78F5C751}" "" ""
54
		WriteRegStr HKEY_CLASSES_ROOT "CLSID\{C539A15D-3AF9-4c92-B771-50CB78F5C751}\InProcServer32" "" "$INSTDIR\tishell64.dll"
55
		WriteRegStr HKEY_CLASSES_ROOT "CLSID\{C539A15D-3AF9-4c92-B771-50CB78F5C751}\InProcServer32" "ThreadingModel" "Apartment"
56
		WriteRegStr HKEY_CLASSES_ROOT "Wow6432Node\CLSID\{C539A15A-3AF9-4c92-B771-50CB78F5C751}" "" "Acronis Backup and Recovery 10 Shell Context Menu Extension"
57
		WriteRegStr HKEY_CLASSES_ROOT "Wow6432Node\CLSID\{C539A15A-3AF9-4c92-B771-50CB78F5C751}\InProcServer32" "" "$INSTDIR\tishell_abr.dll"
58
		WriteRegStr HKEY_CLASSES_ROOT "Wow6432Node\CLSID\{C539A15A-3AF9-4c92-B771-50CB78F5C751}\InProcServer32" "ThreadingModel" "Apartment"
59
		WriteRegStr HKEY_CLASSES_ROOT "Wow6432Node\CLSID\{C539A15B-3AF9-4c92-B771-50CB78F5C751}" "" "Acronis Backup and Recovery 10 Shell Extension"
60
		WriteRegStr HKEY_CLASSES_ROOT "Wow6432Node\CLSID\{C539A15B-3AF9-4c92-B771-50CB78F5C751}\Implemented Categories" "" ""
61
		WriteRegStr HKEY_CLASSES_ROOT "Wow6432Node\CLSID\{C539A15B-3AF9-4c92-B771-50CB78F5C751}\Implemented Categories\{00021490-0000-0000-C000-000000000046}" "" ""
62
		WriteRegStr HKEY_CLASSES_ROOT "Wow6432Node\CLSID\{C539A15B-3AF9-4c92-B771-50CB78F5C751}\InProcServer32" "ThreadingModel" "Apartment"
63
		WriteRegStr HKEY_CLASSES_ROOT "Wow6432Node\CLSID\{C539A15B-3AF9-4c92-B771-50CB78F5C751}\InProcServer32" "" "$INSTDIR\tishell_abr.dll"
64
		WriteRegDWORD HKEY_CLASSES_ROOT "Wow6432Node\CLSID\{C539A15B-3AF9-4c92-B771-50CB78F5C751}\ShellFolder" "Attributes" 0xa0000000
65
		WriteRegStr HKEY_CLASSES_ROOT "Wow6432Node\CLSID\{C539A15C-3AF9-4c92-B771-50CB78F5C751}" "AppID" "{C4E69DB9-E094-483e-B922-E7ADE65FB497}"
66
		WriteRegStr HKEY_CLASSES_ROOT "Wow6432Node\CLSID\{C539A15C-3AF9-4c92-B771-50CB78F5C751}" "" "Acronis True Image Shell Extension Backend"
67
		WriteRegStr HKEY_CLASSES_ROOT "Wow6432Node\CLSID\{C539A15C-3AF9-4c92-B771-50CB78F5C751}\InProcServer32" "ThreadingModel" "Apartment"
68
		WriteRegStr HKEY_CLASSES_ROOT "Wow6432Node\CLSID\{C539A15C-3AF9-4c92-B771-50CB78F5C751}\InProcServer32" "" "$INSTDIR\tishell32.dll"
69
		WriteRegStr HKEY_CLASSES_ROOT "AppID\{C4E69DB9-E094-483e-B922-E7ADE65FB497}" "" "Acronis True Image Shell Extension Backend"
70
		WriteRegStr HKEY_CLASSES_ROOT "AppID\{C4E69DB9-E094-483e-B922-E7ADE65FB497}" "DllSurrogate" ""
71
		StrCpy $InstDir64 $InstDir
72
		SetOutPath $InstDir64
73
		File x64\icu38.dll
74
		File x64\icudt38.dll
75
		File x64\libcrypto10.dll
76
		File x64\libssl10.dll
77
		File x64\resource.dll
78
		File x64\thread_pool.dll
79
		File x32\tishell_abr.dll
80
		File x64\tishell_svr64.dll
81
		File x32\tishell32.dll
82
		File x64\tishell64.dll
83
		WriteRegStr HKEY_LOCAL_MACHINE "SOFTWARE\Wow6432Node\Acronis\BackupAndRecovery\CommonComponents" "icu38.dll" "$INSTDIR\icu38.dll"
84
		WriteRegStr HKEY_LOCAL_MACHINE "SOFTWARE\Wow6432Node\Acronis\BackupAndRecovery\CommonComponents" "libcrypto10.dll" "$INSTDIR\libcrypto10.dll"
85
		WriteRegStr HKEY_LOCAL_MACHINE "SOFTWARE\Wow6432Node\Acronis\BackupAndRecovery\CommonComponents" "libssl10.dll" "$INSTDIR\libssl10.dll"
86
		WriteRegStr HKEY_LOCAL_MACHINE "SOFTWARE\Wow6432Node\Acronis\BackupAndRecovery\CommonComponents" "resource.dll" "$INSTDIR\resource.dll"
87
		WriteRegStr HKEY_LOCAL_MACHINE "SOFTWARE\Wow6432Node\Acronis\BackupAndRecovery\CommonComponents" "thread_pool.dll" "$INSTDIR\thread_pool.dll"
88
	${Else}
89
		DetailPrint "Installer running on 32-bit host"
90
		WriteRegStr HKEY_CLASSES_ROOT "CLSID\{C539A15A-3AF9-4c92-B771-50CB78F5C751}" "" ""
91
		WriteRegStr HKEY_CLASSES_ROOT "CLSID\{C539A15A-3AF9-4c92-B771-50CB78F5C751}\InProcServer32" "" "$INSTDIR\tishell_abr.dll"
92
		WriteRegStr HKEY_CLASSES_ROOT "CLSID\{C539A15A-3AF9-4c92-B771-50CB78F5C751}\InProcServer32" "ThreadingModel" "Apartment"
93
		WriteRegStr HKEY_CLASSES_ROOT "CLSID\{C539A15B-3AF9-4c92-B771-50CB78F5C751}" "" "Acronis Backup and Recovery 10 Shell Extension"
94
		WriteRegStr HKEY_CLASSES_ROOT "CLSID\{C539A15B-3AF9-4c92-B771-50CB78F5C751}\Implemented Categories" "" ""
95
		WriteRegStr HKEY_CLASSES_ROOT "CLSID\{C539A15B-3AF9-4c92-B771-50CB78F5C751}\Implemented Categories\{00021490-0000-0000-C000-000000000046}" "" ""
96
		WriteRegStr HKEY_CLASSES_ROOT "CLSID\{C539A15B-3AF9-4c92-B771-50CB78F5C751}\InProcServer32" "ThreadingModel" "Apartment"
97
		WriteRegStr HKEY_CLASSES_ROOT "CLSID\{C539A15B-3AF9-4c92-B771-50CB78F5C751}\InProcServer32" "" "$INSTDIR\tishell_abr.dll"
98
		WriteRegDWORD HKEY_CLASSES_ROOT "CLSID\{C539A15B-3AF9-4c92-B771-50CB78F5C751}\ShellFolder" "Attributes" 0xa0000000
99
		WriteRegStr HKEY_CLASSES_ROOT "CLSID\{C539A15C-3AF9-4c92-B771-50CB78F5C751}" "AppID" "{C4E69DB9-E094-483e-B922-E7ADE65FB497}"
100
		WriteRegStr HKEY_CLASSES_ROOT "CLSID\{C539A15C-3AF9-4c92-B771-50CB78F5C751}" "" "Acronis True Image Shell Extension Backend"
101
		WriteRegStr HKEY_CLASSES_ROOT "CLSID\{C539A15C-3AF9-4c92-B771-50CB78F5C751}\InProcServer32" "ThreadingModel" "Apartment"
102
		WriteRegStr HKEY_CLASSES_ROOT "CLSID\{C539A15C-3AF9-4c92-B771-50CB78F5C751}\InProcServer32" "" "$INSTDIR\tishell32.dll"
103
		StrCpy $InstDir32 $InstDir
104
		SetOutPath $InstDir32
105
		File x32\icu38.dll
106
		File x32\icudt38.dll
107
		File x32\libcrypto10.dll
108
		File x32\libssl10.dll
109
		File x32\resource.dll
110
		File x32\thread_pool.dll
111
		File x32\tishell_abr.dll
112
		File x32\tishell32.dll
113
	${EndIf}
114
	WriteRegStr HKEY_LOCAL_MACHINE "SOFTWARE\Acronis\BackupAndRecovery\CommonComponents" "icu38.dll" "$INSTDIR\icu38.dll"
115
	WriteRegStr HKEY_LOCAL_MACHINE "SOFTWARE\Acronis\BackupAndRecovery\CommonComponents" "libcrypto10.dll" "$INSTDIR\libcrypto10.dll"
116
	WriteRegStr HKEY_LOCAL_MACHINE "SOFTWARE\Acronis\BackupAndRecovery\CommonComponents" "libssl10.dll" "$INSTDIR\libssl10.dll"
117
	WriteRegStr HKEY_LOCAL_MACHINE "SOFTWARE\Acronis\BackupAndRecovery\CommonComponents" "resource.dll" "$INSTDIR\resource.dll"
118
	WriteRegStr HKEY_LOCAL_MACHINE "SOFTWARE\Acronis\BackupAndRecovery\CommonComponents" "thread_pool.dll" "$INSTDIR\thread_pool.dll"
119
SectionEnd
120
121
Section "MS Visual C++ 2005 CRT files"
122
	${If} ${RunningX64}
123
		File x64\msvcp80.dll
124
		File x64\msvcr80.dll
125
	${Else}
126
		File x32\Microsoft.VC80.CRT.manifest
127
		File x32\msvcp80.dll
128
		File x32\msvcr80.dll
129
	${EndIf}
130
SectionEnd
131
132
Section "Write Uninstaller"
133
    WriteRegExpandStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\Acronis Shell Extension" "UninstallString" '"$INSTDIR\TIB-uninst.exe"'
134
	WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\Acronis Shell Extension" "DisplayName" "Acronis Shell Extension (Remove Only)"
135
 	WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\Acronis Shell Extension" "DisplayIcon" '"$INSTDIR\TIB-uninst.exe"'
136
    WriteRegDWORD HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\Acronis Shell Extension" "NoModify" "1"
137
    WriteRegDWORD HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\Acronis Shell Extension" "NoRepair" "1"
138
	WriteUninstaller $INSTDIR\TIB-uninst.exe
139
SectionEnd
140
141
Section # Final
142
	System::Call "shell32::SHChangeNotify(i, i, i, i) v (0x08000000, 0, 0, 0)"
143
	DetailPrint "If doesn't work - reload explorer.exe !!!"	
144
SectionEnd
145
146
Section "Uninstall"
147
	${If} ${RunningX64}
148
		SetRegView 64
149
	${EndIf}
150
	RMDir /r /REBOOTOK "$INSTDIR"
151
	DeleteRegKey HKEY_CLASSES_ROOT ".tib"
152
	DeleteRegKey HKEY_CLASSES_ROOT "tibfile"
153
	DeleteRegKey HKEY_CLASSES_ROOT "CLSID\{C539A15A-3AF9-4c92-B771-50CB78F5C751}"
154
	DeleteRegKey HKEY_CLASSES_ROOT "CLSID\{C539A15B-3AF9-4c92-B771-50CB78F5C751}"
155
	DeleteRegKey HKEY_CLASSES_ROOT "CLSID\{C539A15C-3AF9-4c92-B771-50CB78F5C751}"
156
	DeleteRegKey HKEY_CLASSES_ROOT "CLSID\{C539A15D-3AF9-4c92-B771-50CB78F5C751}"
157
	DeleteRegKey HKEY_CLASSES_ROOT "Wow6432Node\CLSID\{C539A15A-3AF9-4c92-B771-50CB78F5C751}"
158
	DeleteRegKey HKEY_CLASSES_ROOT "Wow6432Node\CLSID\{C539A15B-3AF9-4c92-B771-50CB78F5C751}"
159
	DeleteRegKey HKEY_CLASSES_ROOT "Wow6432Node\CLSID\{C539A15C-3AF9-4c92-B771-50CB78F5C751}"
160
	DeleteRegKey HKEY_CLASSES_ROOT "AppID\{C4E69DB9-E094-483e-B922-E7ADE65FB497}"
161
	DeleteRegKey HKEY_LOCAL_MACHINE "SOFTWARE\Acronis\BackupAndRecovery\CommonComponents"
162
	DeleteRegKey HKEY_LOCAL_MACHINE "SOFTWARE\Wow6432Node\Acronis\BackupAndRecovery\CommonComponents"
163
	DeleteRegKey HKEY_LOCAL_MACHINE "SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\Acronis Shell Extension"
164
	System::Call "shell32::SHChangeNotify(i, i, i, i) v (0x08000000, 0, 0, 0)"
165
SectionEnd
166
167
Function .onInit
168
	ReadRegStr $R0 HKEY_CLASSES_ROOT "CLSID\{C539A15A-3AF9-4c92-B771-50CB78F5C751}\InProcServer32" ""
169
	IfFileExists $R0 +1 NotInstalled
170
		messageBox MB_OK|MB_ICONSTOP "Acronis Shell Extension already installed!"
171
		Quit
172
	NotInstalled:
173
174
	# set required section as selected and read-only
175
	IntOp $0 ${SF_SELECTED} | ${SF_RO}
176
	SectionSetFlags ${required_id} $0
177
178
	${If} ${RunningX64}
179
		${EnableX64FSRedirection}
180
		StrCpy $InstDir "$PROGRAMFILES64\Acronis\TIB ShellEx"
181
	${Else}
182
		StrCpy $InstDir "$PROGRAMFILES\Acronis\TIB ShellEx"
183
	${EndIf}
184
FunctionEnd