1;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; 2; geany.nsi - this file is part of Geany, a fast and lightweight IDE 3; 4; Copyright 2007 The Geany contributors 5; 6; This program is free software; you can redistribute it and/or modify 7; it under the terms of the GNU General Public License as published by 8; the Free Software Foundation; either version 2 of the License, or 9; (at your option) any later version. 10; 11; This program is distributed in the hope that it will be useful, 12; but WITHOUT ANY WARRANTY; without even the implied warranty of 13; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14; GNU General Public License for more details. 15; 16; You should have received a copy of the GNU General Public License 17; along with this program; if not, write to the Free Software 18; Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 19; 20; 21; Installer script for Geany (Windows Installer) 22; (Script originally generated by the HM NIS Edit Script Wizard) 23;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; 24 25 26; Do a Cyclic Redundancy Check to make sure the installer was not corrupted by the download 27CRCCheck force 28RequestExecutionLevel highest ; set execution level for Windows Vista 29; NSIS 3 Unicode support 30Unicode true 31 32;;;;;;;;;;;;;;;;;;; 33; helper defines ; 34;;;;;;;;;;;;;;;;;;; 35!define PRODUCT_NAME "Geany" 36!define PRODUCT_VERSION "@VERSION@" 37!define PRODUCT_VERSION_ID "@VERSION@.0.0" 38!define PRODUCT_PUBLISHER "The Geany developer team" 39!define PRODUCT_WEB_SITE "https://www.geany.org/" 40!define PRODUCT_DIR_REGKEY "Software\Geany" 41!define PRODUCT_UNINST_KEY "Software\Microsoft\Windows\CurrentVersion\Uninstall\${PRODUCT_NAME}" 42!define PRODUCT_EXE "$INSTDIR\bin\Geany.exe" 43!define PRODUCT_REGNAME "Geany.ProjectFile" 44!define PRODUCT_EXT ".geany" 45!define GTK_VERSION @GTK_VERSION@ 46 47;;;;;;;;;;;;;;;;;;;;; 48; Version resource ; 49;;;;;;;;;;;;;;;;;;;;; 50VIProductVersion "${PRODUCT_VERSION_ID}" 51VIAddVersionKey "ProductName" "${PRODUCT_NAME}" 52VIAddVersionKey "FileVersion" "${PRODUCT_VERSION}" 53VIAddVersionKey "ProductVersion" "${PRODUCT_VERSION}" 54VIAddVersionKey "LegalCopyright" "Copyright 2005 The Geany contributors" 55VIAddVersionKey "FileDescription" "${PRODUCT_NAME} Installer" 56 57BrandingText "$(^NAME) installer (NSIS ${NSIS_VERSION})" 58InstallDir "$PROGRAMFILES64\Geany" 59Name "${PRODUCT_NAME} ${PRODUCT_VERSION}" 60SetCompressor /SOLID lzma 61ShowInstDetails hide 62ShowUnInstDetails hide 63XPStyle on 64ManifestSupportedOS all 65!ifndef GEANY_INSTALLER_NAME 66!define GEANY_INSTALLER_NAME "geany-${PRODUCT_VERSION}_setup.exe" 67!endif 68!ifndef GEANY_RELEASE_DIR 69!define GEANY_RELEASE_DIR "geany-${PRODUCT_VERSION}" 70!endif 71!ifndef GEANY_THEMES_DIR 72!define GEANY_THEMES_DIR "..\geany-themes" 73!endif 74!ifndef GTK_BUNDLE_DIR 75!define GTK_BUNDLE_DIR "gtk" 76!endif 77 78OutFile "${GEANY_INSTALLER_NAME}" 79 80Var Answer 81Var UserName 82Var StartmenuFolder 83Var UNINSTDIR 84 85;;;;;;;;;;;;;;;; 86; MUI Settings ; 87;;;;;;;;;;;;;;;; 88!include "MUI2.nsh" 89 90;Reserve files used in .onInit, for faster start-up 91ReserveFile "${NSISDIR}\Plugins\x86-unicode\System.dll" 92ReserveFile "${NSISDIR}\Plugins\x86-unicode\UserInfo.dll" 93ReserveFile "${NSISDIR}\Plugins\x86-unicode\InstallOptions.dll" 94ReserveFile "${NSISDIR}\Plugins\x86-unicode\LangDLL.dll" 95 96!define MUI_ABORTWARNING 97!define MUI_ICON "icons\geany.ico" 98!define MUI_UNICON "${NSISDIR}\Contrib\Graphics\Icons\modern-uninstall-full.ico" 99 100; Welcome page 101!insertmacro MUI_PAGE_WELCOME 102; License page 103;!define MUI_LICENSEPAGE_RADIOBUTTONS 104!insertmacro MUI_PAGE_LICENSE "${GEANY_RELEASE_DIR}\Copying.txt" 105; Components page 106!insertmacro MUI_PAGE_COMPONENTS 107; Directory page 108!define MUI_PAGE_CUSTOMFUNCTION_LEAVE OnDirLeave 109!insertmacro MUI_PAGE_DIRECTORY 110; Start menu page 111!define MUI_STARTMENUPAGE_DEFAULTFOLDER "Geany" 112!define MUI_STARTMENUPAGE_REGISTRY_ROOT HKLM 113!define MUI_STARTMENUPAGE_REGISTRY_KEY "${PRODUCT_UNINST_KEY}" 114!define MUI_STARTMENUPAGE_REGISTRY_VALUENAME "Start Menu Folder" 115!insertmacro MUI_PAGE_STARTMENU ${PRODUCT_NAME} "$StartmenuFolder" 116; Instfiles page 117!insertmacro MUI_PAGE_INSTFILES 118; Finish page 119!define MUI_FINISHPAGE_SHOWREADME "$INSTDIR\News.txt" 120!define MUI_FINISHPAGE_SHOWREADME_TEXT "Show Release Notes" 121!define MUI_FINISHPAGE_SHOWREADME_NOTCHECKED 122!define MUI_FINISHPAGE_RUN "$INSTDIR\bin\Geany.exe" 123!define MUI_FINISHPAGE_RUN_NOTCHECKED 124!insertmacro MUI_PAGE_FINISH 125 126!insertmacro MUI_UNPAGE_INSTFILES ; Uninstaller page 127!insertmacro MUI_LANGUAGE "English" ; Language file 128 129;;;;;;;;;;;;;;;;;;;;;;;;;;; 130; Sections and InstTypes ; 131;;;;;;;;;;;;;;;;;;;;;;;;;;; 132InstType "Full" 133InstType "Minimal" 134 135Section "!Program Files" SEC01 136 SectionIn RO 1 2 137 SetOverwrite ifnewer 138 139 SetOutPath "$INSTDIR" 140 File "${GEANY_RELEASE_DIR}\*.txt" 141 142 SetOutPath "$INSTDIR\bin" 143 File "${GEANY_RELEASE_DIR}\bin\Geany.exe" 144 File "${GEANY_RELEASE_DIR}\bin\*Geany*.dll" 145 # non-GTK dependencies 146 File "${GTK_BUNDLE_DIR}\bin\libgcc_s_seh*.dll" 147 File "${GTK_BUNDLE_DIR}\bin\libstdc++-*.dll" 148 File "${GTK_BUNDLE_DIR}\bin\libwinpthread*.dll" 149 150 SetOutPath "$INSTDIR\libexec" 151 File /r "${GEANY_RELEASE_DIR}\libexec\*" 152 153 SetOutPath "$INSTDIR\data" 154 File "${GEANY_RELEASE_DIR}\data\GPL-2" 155 File "${GEANY_RELEASE_DIR}\data\filetype_extensions.conf" 156 File "${GEANY_RELEASE_DIR}\data\geany.glade" 157 File "${GEANY_RELEASE_DIR}\data\geany-3.20.css" 158 File "${GEANY_RELEASE_DIR}\data\geany.css" 159 File "${GEANY_RELEASE_DIR}\data\snippets.conf" 160 File "${GEANY_RELEASE_DIR}\data\ui_toolbar.xml" 161 162 SetOutPath "$INSTDIR\data\filedefs" 163 File /r "${GEANY_RELEASE_DIR}\data\filedefs\*" 164 165 SetOutPath "$INSTDIR\data\templates" 166 File /r "${GEANY_RELEASE_DIR}\data\templates\*" 167 168 SetOutPath "$INSTDIR\data\colorschemes" 169 File /r "${GEANY_RELEASE_DIR}\data\colorschemes\*" 170 # Geany color schemes project, don't bail out if they are missing 171 File /nonfatal /r "${GEANY_THEMES_DIR}\colorschemes\*.conf" 172 173 SetOutPath "$INSTDIR\share\icons" 174 File /r "${GEANY_RELEASE_DIR}\share\icons\*" 175 176 SetOutPath "$INSTDIR" 177 178 CreateShortCut "$INSTDIR\Geany.lnk" "$INSTDIR\bin\Geany.exe" 179 !insertmacro MUI_STARTMENU_WRITE_BEGIN ${PRODUCT_NAME} 180 CreateDirectory "$SMPROGRAMS\$StartmenuFolder" 181 CreateShortCut "$SMPROGRAMS\$StartmenuFolder\Geany.lnk" "$INSTDIR\bin\Geany.exe" 182 !insertmacro MUI_STARTMENU_WRITE_END 183 184 ; register the extension .geany 185 ; write information about file type 186 WriteRegStr SHCTX "Software\Classes\${PRODUCT_REGNAME}" "" "${PRODUCT_NAME} Project File" 187 WriteRegStr SHCTX "Software\Classes\${PRODUCT_REGNAME}\DefaultIcon" "" "${PRODUCT_EXE},0" 188 WriteRegStr SHCTX "Software\Classes\${PRODUCT_REGNAME}\Shell\open\command" "" '"${PRODUCT_EXE}" "%1"' 189 ; write information about file extensions 190 WriteRegStr SHCTX "Software\Classes\${PRODUCT_EXT}" "" "${PRODUCT_REGNAME}" 191 ; refresh shell 192 System::Call 'shell32.dll::SHChangeNotify(i, i, i, i) (0x08000000, 0, 0, 0)' 193SectionEnd 194 195Section "Plugins" SEC02 196 SectionIn 1 197 SetOverwrite ifnewer 198 SetOutPath "$INSTDIR\lib\geany" 199 File "${GEANY_RELEASE_DIR}\lib\geany\*.dll" 200SectionEnd 201 202Section "Language Files" SEC03 203 SectionIn 1 204 SetOutPath "$INSTDIR\share\locale" 205 File /r "${GEANY_RELEASE_DIR}\share\locale\*" 206 SetOutPath "$INSTDIR\share\locale" 207 File /r "${GTK_BUNDLE_DIR}\share\locale\*" 208SectionEnd 209 210Section "Documentation" SEC04 211 SectionIn 1 212 SetOverwrite ifnewer 213 SetOutPath "$INSTDIR\share\doc" 214 File /r "${GEANY_RELEASE_DIR}\share\doc\*" 215 WriteIniStr "$INSTDIR\Documentation.url" "InternetShortcut" "URL" "$INSTDIR\share\doc\geany\html\index.html" 216 !insertmacro MUI_STARTMENU_WRITE_BEGIN ${PRODUCT_NAME} 217 CreateShortCut "$SMPROGRAMS\$StartmenuFolder\Documentation.lnk" "$INSTDIR\Documentation.url" 218 !insertmacro MUI_STARTMENU_WRITE_END 219SectionEnd 220 221Section "Autocompletion Tags" SEC05 222 SectionIn 1 223 SetOverwrite ifnewer 224 SetOutPath "$INSTDIR\data\tags" 225 File /r "${GEANY_RELEASE_DIR}\data\tags\*" 226SectionEnd 227 228; Include GTK runtime library but only if desired from command line 229Section "GTK ${GTK_VERSION} Runtime Environment" SEC06 230 SectionIn 1 231 SetOverwrite ifnewer 232 SetOutPath "$INSTDIR" 233 File "${GTK_BUNDLE_DIR}\ReadMe.Dependencies.Geany.txt" 234 SetOutPath "$INSTDIR\bin" 235 File /r "${GTK_BUNDLE_DIR}\bin\*" 236 SetOutPath "$INSTDIR\etc" 237 File /r "${GTK_BUNDLE_DIR}\etc\*" 238 SetOutPath "$INSTDIR\lib" 239 File /r "${GTK_BUNDLE_DIR}\lib\*" 240 SetOutPath "$INSTDIR\share" 241 File /r /x "*.mo" "${GTK_BUNDLE_DIR}\share\*" 242SectionEnd 243 244Section "Context Menus" SEC07 245 SectionIn 1 246 WriteRegStr HKCR "*\shell\OpenWithGeany" "" "Open with Geany" 247 WriteRegStr HKCR "*\shell\OpenWithGeany" "Icon" "$INSTDIR\bin\geany.exe" 248 WriteRegStr HKCR "*\shell\OpenWithGeany\command" "" '"$INSTDIR\bin\geany.exe" "%1"' 249SectionEnd 250 251Section "Desktop Shortcuts" SEC08 252 SectionIn 1 253 CreateShortCut "$DESKTOP\Geany.lnk" "$INSTDIR\bin\Geany.exe" 254 CreateShortCut "$QUICKLAUNCH\Geany.lnk" "$INSTDIR\bin\Geany.exe" 255SectionEnd 256 257; Development files 258Section "Development files" SEC09 259 SectionIn 1 260 SetOverwrite ifnewer 261 SetOutPath "$INSTDIR\include" 262 File /r "${GEANY_RELEASE_DIR}\include\*" 263 264 SetOutPath "$INSTDIR\lib\pkgconfig" 265 File "${GEANY_RELEASE_DIR}\lib\pkgconfig\geany.pc" 266SectionEnd 267 268Section -AdditionalIcons 269 SetOutPath $INSTDIR 270 !insertmacro MUI_STARTMENU_WRITE_BEGIN ${PRODUCT_NAME} 271 WriteIniStr "$INSTDIR\Website.url" "InternetShortcut" "URL" "${PRODUCT_WEB_SITE}" 272 CreateShortCut "$SMPROGRAMS\$StartmenuFolder\Website.lnk" "$INSTDIR\Website.url" 273 CreateShortCut "$SMPROGRAMS\$StartmenuFolder\Uninstall.lnk" "$INSTDIR\uninst.exe" 274 !insertmacro MUI_STARTMENU_WRITE_END 275SectionEnd 276 277Section -Post 278 WriteUninstaller "$INSTDIR\uninst.exe" 279 WriteRegStr SHCTX "${PRODUCT_DIR_REGKEY}" Path "$INSTDIR" 280 WriteRegStr SHCTX "${PRODUCT_UNINST_KEY}" "StartMenu" "$SMPROGRAMS\$StartmenuFolder" 281 ${if} $Answer == "yes" ; if user is admin 282 WriteRegStr SHCTX "${PRODUCT_UNINST_KEY}" "DisplayName" "$(^Name)" 283 WriteRegStr SHCTX "${PRODUCT_UNINST_KEY}" "UninstallString" "$INSTDIR\uninst.exe" 284 WriteRegStr SHCTX "${PRODUCT_UNINST_KEY}" "DisplayIcon" "$INSTDIR\bin\Geany.exe" 285 WriteRegStr SHCTX "${PRODUCT_UNINST_KEY}" "DisplayVersion" "${PRODUCT_VERSION}" 286 WriteRegStr SHCTX "${PRODUCT_UNINST_KEY}" "URLInfoAbout" "${PRODUCT_WEB_SITE}" 287 WriteRegStr SHCTX "${PRODUCT_UNINST_KEY}" "URLUpdateInfo" "${PRODUCT_WEB_SITE}" 288 WriteRegStr SHCTX "${PRODUCT_UNINST_KEY}" "Publisher" "${PRODUCT_PUBLISHER}" 289 WriteRegDWORD SHCTX "${PRODUCT_UNINST_KEY}" "NoModify" 0x00000001 290 WriteRegDWORD SHCTX "${PRODUCT_UNINST_KEY}" "NoRepair" 0x00000001 291 ${endif} 292SectionEnd 293 294Section Uninstall 295 Delete "$INSTDIR\Website.url" 296 Delete "$INSTDIR\Documentation.url" 297 Delete "$INSTDIR\uninst.exe" 298 Delete "$INSTDIR\News.txt" 299 Delete "$INSTDIR\ReadMe.txt" 300 Delete "$INSTDIR\ReadMe.Dependencies.Geany.txt" 301 Delete "$INSTDIR\Thanks.txt" 302 Delete "$INSTDIR\ToDo.txt" 303 Delete "$INSTDIR\Authors.txt" 304 Delete "$INSTDIR\ChangeLog.txt" 305 Delete "$INSTDIR\Copying.txt" 306 Delete "$INSTDIR\Geany.lnk" 307 308 ; delete start menu entry 309 ReadRegStr $0 SHCTX "${PRODUCT_UNINST_KEY}" "StartMenu" 310 RMDir /r "$0" 311 312 Delete "$QUICKLAUNCH\Geany.lnk" 313 Delete "$DESKTOP\Geany.lnk" 314 315 RMDir /r "$INSTDIR\bin" 316 RMDir /r "$INSTDIR\data" 317 RMDir /r "$INSTDIR\etc" 318 RMDir /r "$INSTDIR\include" 319 RMDir /r "$INSTDIR\lib" 320 RMDir /r "$INSTDIR\libexec" 321 RMDir /r "$INSTDIR\share" 322 RMDir "$INSTDIR" 323 324 ; remove .geany file extension 325 ReadRegStr $R0 SHCTX "Software\Classes\${PRODUCT_EXT}" "" 326 ${if} $R0 == "${PRODUCT_REGNAME}" 327 DeleteRegKey SHCTX "${PRODUCT_EXT}" 328 DeleteRegKey HKCR "${PRODUCT_EXT}" 329 DeleteRegKey SHCTX "${PRODUCT_REGNAME}" 330 DeleteRegKey HKCR "${PRODUCT_REGNAME}" 331 ${endif} 332 333 DeleteRegKey HKCR "*\shell\OpenWithGeany" 334 335 DeleteRegKey SHCTX "${PRODUCT_UNINST_KEY}" 336 DeleteRegKey HKCU "${PRODUCT_UNINST_KEY}" 337 DeleteRegKey SHCTX "${PRODUCT_DIR_REGKEY}" 338 DeleteRegKey HKCU "${PRODUCT_DIR_REGKEY}" 339 340 SetAutoClose true 341SectionEnd 342 343;;;;;;;;;;;;;;;;;;;;;;;;; 344; Section descriptions ; 345;;;;;;;;;;;;;;;;;;;;;;;;; 346!insertmacro MUI_FUNCTION_DESCRIPTION_BEGIN 347!insertmacro MUI_DESCRIPTION_TEXT ${SEC01} "Required program files. You cannot skip these files." 348!insertmacro MUI_DESCRIPTION_TEXT ${SEC02} "Available plugins like 'Version Diff', 'Class Builder' and 'Insert Special Characters'." 349!insertmacro MUI_DESCRIPTION_TEXT ${SEC03} "Various translations of Geany's interface." 350!insertmacro MUI_DESCRIPTION_TEXT ${SEC04} "Manual in Text and HTML format." 351!insertmacro MUI_DESCRIPTION_TEXT ${SEC05} "Symbol lists necessary for auto completion of symbols." 352!insertmacro MUI_DESCRIPTION_TEXT ${SEC06} "You need these files to run Geany. If you have already installed a GTK Runtime Environment (${GTK_VERSION} or higher), you can skip it." 353!insertmacro MUI_DESCRIPTION_TEXT ${SEC07} "Add context menu item 'Open With Geany'" 354!insertmacro MUI_DESCRIPTION_TEXT ${SEC08} "Create shortcuts for Geany on the desktop and in the Quicklaunch Bar" 355!insertmacro MUI_DESCRIPTION_TEXT ${SEC09} "You need these files only if you want to develop own plugins for Geany. If unsure, you can skip it." 356!insertmacro MUI_FUNCTION_DESCRIPTION_END 357 358;;;;;;;;;;;;;;;;;;;;; 359; helper functions ; 360;;;;;;;;;;;;;;;;;;;;; 361 362; (from http://jabref.svn.sourceforge.net/viewvc/jabref/trunk/jabref/src/windows/nsis/setup.nsi) 363!macro IsUserAdmin Result UName 364 ClearErrors 365 UserInfo::GetName 366 IfErrors Win9x 367 Pop $0 368 StrCpy ${UName} $0 369 UserInfo::GetAccountType 370 Pop $1 371 ${if} $1 == "Admin" 372 StrCpy ${Result} "yes" 373 ${else} 374 StrCpy ${Result} "no" 375 ${endif} 376 Goto done 377 378Win9x: 379 StrCpy ${Result} "yes" 380done: 381!macroend 382 383Function .onInit 384 StrCpy "$StartmenuFolder" "Geany" 385 386 ; (from http://jabref.svn.sourceforge.net/viewvc/jabref/trunk/jabref/src/windows/nsis/setup.nsi) 387 ; If the user does *not* have administrator privileges, abort 388 StrCpy $Answer "" 389 StrCpy $UserName "" 390 !insertmacro IsUserAdmin $Answer $UserName ; macro from LyXUtils.nsh 391 ${if} $Answer == "yes" 392 SetShellVarContext all ; set that e.g. shortcuts will be created for all users 393 ${else} 394 SetShellVarContext current 395 ; TODO is this really what we want? $PROGRAMFILES is not much better because 396 ; probably the unprivileged user can't write it anyways 397 StrCpy $INSTDIR "$PROFILE\$(^Name)" 398 ${endif} 399 400 ; prevent running multiple instances of the installer 401 System::Call 'kernel32::CreateMutexA(i 0, i 0, t "geany_installer") i .r1 ?e' 402 Pop $R0 403 StrCmp $R0 0 +3 404 MessageBox MB_OK|MB_ICONEXCLAMATION "The installer is already running." /SD IDOK 405 Abort 406 ; warn about a new install over an existing installation 407 ReadRegStr $R0 SHCTX "${PRODUCT_UNINST_KEY}" "UninstallString" 408 StrCmp $R0 "" finish 409 410 MessageBox MB_YESNO|MB_ICONEXCLAMATION \ 411 "Geany has already been installed. $\nDo you want to remove the previous version before installing $(^Name) ?" \ 412 /SD IDYES IDYES remove IDNO finish 413 414remove: 415 ; run the uninstaller 416 ClearErrors 417 ; we read the installation path of the old installation from the Registry 418 ReadRegStr $UNINSTDIR SHCTX "${PRODUCT_DIR_REGKEY}" "Path" 419 IfSilent dosilent nonsilent 420dosilent: 421 ExecWait '$R0 /S _?=$UNINSTDIR' ;Do not copy the uninstaller to a temp file 422 Goto finish 423nonsilent: 424 ExecWait '$R0 _?=$UNINSTDIR' ;Do not copy the uninstaller to a temp file 425finish: 426FunctionEnd 427 428Function un.onUninstSuccess 429 HideWindow 430 MessageBox MB_ICONINFORMATION|MB_OK "$(^Name) was successfully removed from your computer." \ 431 /SD IDOK 432FunctionEnd 433 434Function un.onInit 435 ; If the user does *not* have administrator privileges, abort 436 StrCpy $Answer "" 437 !insertmacro IsUserAdmin $Answer $UserName 438 ${if} $Answer == "yes" 439 SetShellVarContext all 440 ${else} 441 ; check if the Geany has been installed with admin permisions 442 ReadRegStr $0 HKLM "${PRODUCT_UNINST_KEY}" "Publisher" 443 ${if} $0 != "" 444 MessageBox MB_OK|MB_ICONSTOP "You need administrator privileges to uninstall Geany!" \ 445 /SD IDOK 446 Abort 447 ${endif} 448 SetShellVarContext current 449 ${endif} 450 451 MessageBox MB_ICONQUESTION|MB_YESNO|MB_DEFBUTTON2 "Are you sure you want to completely remove $(^Name) and all of its components?" \ 452 /SD IDYES IDYES +2 453 Abort 454FunctionEnd 455 456Function OnDirLeave 457 ClearErrors 458 SetOutPath "$INSTDIR" ; what about IfError creating $INSTDIR? 459 GetTempFileName $1 "$INSTDIR" ; creates tmp file (or fails) 460 FileOpen $0 "$1" "w" ; error to open? 461 FileWriteByte $0 "0" 462 IfErrors notPossible possible 463 464notPossible: 465 RMDir "$INSTDIR" ; removes folder if empty 466 MessageBox MB_OK "The given directory is not writeable. Please choose another one!" /SD IDOK 467 Abort 468possible: 469 FileClose $0 470 Delete "$1" 471FunctionEnd 472