Changeset 108772 in vbox for trunk/src/VBox/Additions/WINNT/Installer/VBoxGuestAdditionsUninstallOld.nsh
- Timestamp:
- Mar 27, 2025 3:32:33 PM (6 weeks ago)
- svn:sync-xref-src-repo-rev:
- 168200
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Additions/WINNT/Installer/VBoxGuestAdditionsUninstallOld.nsh
r106061 r108772 1 1 ; $Id$ 2 2 ;; @file 3 ; VBoxGuestAdditionsUninstallOld.nsh - Guest Additions uninstallation handling for legacy packages. 3 ; VBoxGuestAdditionsUninstallOld.nsh - Guest Additions uninstallation and migration handling 4 ; for older Guest Additions and legacy (Sun [xVM] / innotek) packages. 4 5 ; 5 6 … … 26 27 ; 27 28 28 !ifdef UNUSED_CODE29 !macro Uninstall_RunExtUnInstaller un30 Function ${un}Uninstall_RunExtUnInstaller31 32 Pop $033 Push $134 Push $235 36 ; Try to run the current uninstaller37 StrCpy $1 "$0\uninst.exe"38 IfFileExists "$1" run 039 MessageBox MB_OK "VirtualBox Guest Additions uninstaller not found! Path = $1" /SD IDOK40 StrCpy $0 1 ; Tell the caller that we were not able to start the uninstaller41 Goto exit42 43 run:44 45 ; Always try to run in silent mode46 Goto run_uninst_silent47 48 run_uninst_silent:49 50 ExecWait '"$1" /S _?=$0' $2 ; Silently run uninst.exe in it's dir and don't copy it to a temp. location51 Goto handle_result52 53 run_uninst:54 55 ExecWait '"$1" _?=$0' $2 ; Run uninst.exe in it's dir and don't copy it to a temp. location56 Goto handle_result57 58 handle_result:59 60 ; Note that here a race might going on after the user clicked on61 ; "Reboot now" in the installer ran above and this installer cleaning62 ; up afterwards63 64 ; ... so try to abort the current reboot / shutdown caused by the installer ran before65 Call ${un}AbortShutdown66 67 ;!ifdef _DEBUG68 ; MessageBox MB_OK 'Debug Message: Uninstaller was called, result is: $2' /SD IDOK69 ;!endif70 71 ${Switch} $2 ; Check exit codes72 ${Case} 1 ; Aborted by user73 StrCpy $0 1 ; Tell the caller that we were aborted by the user74 ${Break}75 ${Case} 2 ; Aborted by script (that might be okay)76 StrCpy $0 0 ; All went well77 ${Break}78 ${Default} ; Normal exixt79 StrCpy $0 0 ; All went well80 ${Break}81 ${EndSwitch}82 Goto exit83 84 exit:85 86 Pop $287 Pop $188 Push $089 90 FunctionEnd91 !macroend92 !insertmacro Uninstall_RunExtUnInstaller ""93 !insertmacro Uninstall_RunExtUnInstaller "un."94 !endif ; UNUSED_CODE95 96 29 !macro Uninstall_WipeInstallationDirectory un 30 ;; 31 ; Wipes the installation directory (recursively). 32 ; 33 ; Only used for wiping legacy installations (innotek, Sun, Sun xVM). 34 ; 35 ; Input: 36 ; Stack[0]: Installation directory to wipe. 37 ; Output: 38 ; Stack[0}: Return code. 0 means success. 39 ; 97 40 Function ${un}Uninstall_WipeInstallationDirectory 98 41 … … 118 61 119 62 RMDir /r /REBOOTOK "$0" 120 StrCpy $0 0 ; All went well 63 StrCpy $0 0 ; All went well. 121 64 Goto exit 122 65 … … 124 67 125 68 ${LogVerbose} "Won't remove directory ($0)!" 126 StrCpy $0 1 ; Signal some failure 69 StrCpy $0 1 ; Signal some failure. 127 70 Goto exit 128 71 … … 137 80 !insertmacro Uninstall_WipeInstallationDirectory "" 138 81 139 ; This function cleans up an old Sun installation 82 83 !ifndef UNINSTALLER_ONLY 84 !macro Uninstall_Before7_2 un 85 ;; 86 ; Uninstalls all files of a < 7.2 Guest Additions installation. 87 ; 88 ; These were stored in a "flat" hierarchy directly in the installation directory, 89 ; which made it impossible to tell which files belong to which component. 90 ; 91 ; This also will be run when installing 7.2 Guest Additions to clean things up. 92 ; 93 ; Input: 94 ; None 95 ; Output: 96 ; None 97 ; 98 Function ${un}Uninstall_Before7_2 99 100 Delete /REBOOTOK "$INSTDIR\VBoxVideo.sys" 101 Delete /REBOOTOK "$INSTDIR\VBoxVideo.inf" 102 Delete /REBOOTOK "$INSTDIR\VBoxVideo.cat" 103 Delete /REBOOTOK "$INSTDIR\VBoxVideoEarlyNT.inf" 104 Delete /REBOOTOK "$INSTDIR\VBoxVideoEarlyNT.cat" 105 Delete /REBOOTOK "$INSTDIR\VBoxDisp.dll" 106 107 Delete /REBOOTOK "$INSTDIR\VBoxMouse.sys" 108 Delete /REBOOTOK "$INSTDIR\VBoxMouse.inf" 109 Delete /REBOOTOK "$INSTDIR\VBoxMouse.cat" 110 111 Delete /REBOOTOK "$INSTDIR\VBoxTray.exe" 112 113 Delete /REBOOTOK "$INSTDIR\VBoxGuest.sys" 114 Delete /REBOOTOK "$INSTDIR\VBoxGuest.inf" 115 Delete /REBOOTOK "$INSTDIR\VBoxGuest.cat" 116 Delete /REBOOTOK "$INSTDIR\VBoxGuestEarlyNT.inf" 117 Delete /REBOOTOK "$INSTDIR\VBoxGuestEarlyNT.cat" 118 119 Delete /REBOOTOK "$INSTDIR\VBCoInst.dll" ; Deprecated, does not get installed anymore. 120 Delete /REBOOTOK "$INSTDIR\VBoxControl.exe" 121 Delete /REBOOTOK "$INSTDIR\VBoxService.exe" 122 Delete /REBOOTOK "$INSTDIR\VBoxWHQLFake.exe"; Removed in r152293 (runup to 7.0). 123 Delete /REBOOTOK "$INSTDIR\VBoxICD.dll" ; Removed in r151892 (runup to 7.0). 124 125 !if $%VBOX_WITH_WDDM% == "1" 126 Delete /REBOOTOK "$INSTDIR\VBoxWddm.cat" 127 Delete /REBOOTOK "$INSTDIR\VBoxWddm.sys" 128 Delete /REBOOTOK "$INSTDIR\VBoxWddm.inf" 129 ; Obsolete files begin 130 Delete /REBOOTOK "$INSTDIR\VBoxVideoWddm.cat" 131 Delete /REBOOTOK "$INSTDIR\VBoxVideoWddm.sys" 132 Delete /REBOOTOK "$INSTDIR\VBoxVideoWddm.inf" 133 Delete /REBOOTOK "$INSTDIR\VBoxVideoW8.cat" 134 Delete /REBOOTOK "$INSTDIR\VBoxVideoW8.sys" 135 Delete /REBOOTOK "$INSTDIR\VBoxVideoW8.inf" 136 ; Obsolete files end 137 Delete /REBOOTOK "$INSTDIR\VBoxDispD3D.dll" 138 !if $%VBOX_WITH_WDDM_DX% == "1" 139 Delete /REBOOTOK "$INSTDIR\VBoxDX.dll" 140 !endif 141 !if $%VBOX_WITH_MESA3D% == "1" 142 Delete /REBOOTOK "$INSTDIR\VBoxNine.dll" 143 Delete /REBOOTOK "$INSTDIR\VBoxSVGA.dll" 144 Delete /REBOOTOK "$INSTDIR\VBoxICD.dll" 145 Delete /REBOOTOK "$INSTDIR\VBoxGL.dll" 146 !endif 147 148 Delete /REBOOTOK "$INSTDIR\VBoxD3D9wddm.dll" 149 Delete /REBOOTOK "$INSTDIR\wined3dwddm.dll" 150 ; Try to delete libWine in case it is there from old installation. 151 Delete /REBOOTOK "$INSTDIR\libWine.dll" 152 153 !if $%KBUILD_TARGET_ARCH% == "amd64" 154 Delete /REBOOTOK "$INSTDIR\VBoxDispD3D-x86.dll" 155 !if $%VBOX_WITH_WDDM_DX% == "1" 156 Delete /REBOOTOK "$INSTDIR\VBoxDX-x86.dll" 157 !endif 158 !if $%VBOX_WITH_MESA3D% == "1" 159 Delete /REBOOTOK "$INSTDIR\VBoxNine-x86.dll" 160 Delete /REBOOTOK "$INSTDIR\VBoxSVGA-x86.dll" 161 Delete /REBOOTOK "$INSTDIR\VBoxICD-x86.dll" 162 Delete /REBOOTOK "$INSTDIR\VBoxGL-x86.dll" 163 !endif 164 165 Delete /REBOOTOK "$INSTDIR\VBoxD3D9wddm-x86.dll" 166 Delete /REBOOTOK "$INSTDIR\wined3dwddm-x86.dll" 167 !endif ; $%KBUILD_TARGET_ARCH% == "amd64" 168 !endif ; $%VBOX_WITH_WDDM% == "1" 169 170 Delete /REBOOTOK "$INSTDIR\RegCleanup.exe" ; Obsolete since r165894 (see #10799). 171 Delete /REBOOTOK "$INSTDIR\VBoxDrvInst.exe" 172 Delete /REBOOTOK "$INSTDIR\VBoxGuestInstallHelper.exe" 173 174 Delete "$SMPROGRAMS\${PRODUCT_NAME}\Website.lnk" ; Old name. Changed to Website.url in r153663. 175 Delete "$DESKTOP\${PRODUCT_NAME}.lnk" ; Obsolete. We don't install a desktop link any more. 176 177 FunctionEnd 178 !macroend 179 !insertmacro Uninstall_Before7_2 "" 180 !endif ; UNINSTALLER_ONLY 181 182 140 183 !macro Uninstall_Sun un 184 ;; 185 ; Function to clean up an old Sun (pre-Oracle) installation. 186 ; 187 ; Input: 188 ; None 189 ; Output: 190 ; None 191 ; 141 192 Function ${un}Uninstall_Sun 142 193 … … 145 196 Push $2 146 197 147 ; Get current installation path 198 ; Get current installation path. 148 199 ReadRegStr $0 HKLM "SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\Sun VirtualBox Guest Additions" "UninstallString" 149 200 StrCmp $0 "" exit … … 162 213 StrCmp $1 "" exit 163 214 164 ; Save current i8042prt info to new uninstall registry path 165 ReadRegStr $0 HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\Sun VirtualBox Guest Additions" ${ORG_MOUSE_PATH}166 WriteRegStr HKLM "${ PRODUCT_UNINST_KEY}" ${ORG_MOUSE_PATH}$0167 168 ; Try to wipe current installation directory 169 Push $1 ; Push uninstaller path to stack 215 ; Save current i8042prt info to new uninstall registry path. 216 ReadRegStr $0 HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\Sun VirtualBox Guest Additions" "${REGISTRY_VAL_ORG_MOUSE_PATH}" 217 WriteRegStr HKLM "${REGISTRY_KEY_UNINST_PRODUCT}" "${REGISTRY_VAL_ORG_MOUSE_PATH}" $0 218 219 ; Try to wipe current installation directory. 220 Push $1 ; Push uninstaller path to stack. 170 221 Call ${un}Uninstall_WipeInstallationDirectory 171 222 Pop $2 ; Get uninstaller exit code from stack 172 StrCmp $2 0 common exit ; Only process common part if exit code is 0, otherwise exit 223 StrCmp $2 0 common exit ; Only process common part if exit code is 0, otherwise exit. 173 224 174 225 common: 175 226 176 ; Make sure everything is cleaned up in case the old uninstaller did forget something 227 ; Make sure everything is cleaned up in case the old uninstaller did forget something. 177 228 DeleteRegKey HKLM "SOFTWARE\Sun\VirtualBox Guest Additions" 178 229 DeleteRegKey /ifempty HKLM "SOFTWARE\Sun" … … 182 233 Delete /REBOOTOK "$1\PCNTPCI5.sys" 183 234 184 ; Try to remove old installation directory if empty 235 ; Try to remove old installation directory if empty. 185 236 RMDir /r /REBOOTOK "$SMPROGRAMS\Sun VirtualBox Guest Additions" 186 237 RMDir /REBOOTOK "$1" 187 238 188 ; Get original mouse driver info and restore it 189 ;ReadRegStr $0 ${PRODUCT_UNINST_ROOT_KEY} "${PRODUCT_UNINST_KEY}" ${ORG_MOUSE_PATH}239 ; Get original mouse driver info and restore it. 240 ;ReadRegStr $0 "${REGISTRY_KEY_UNINST_ROOT}" "${REGISTRY_KEY_UNINST_PRODUCT}" "${REGISTRY_VAL_ORG_MOUSE_PATH}" 190 241 ;WriteRegStr HKLM "SYSTEM\CurrentControlSet\Services\i8042prt" "ImagePath" $0 191 242 ;Delete "$SYSDIR\drivers\VBoxMouseNT.sys" 192 243 193 244 ; Delete vendor installation directory (only if completely empty) 194 !if $%KBUILD_TARGET_ARCH% == "x86" ; 32-bit245 !if $%KBUILD_TARGET_ARCH% == "x86" 195 246 RMDir /REBOOTOK "$PROGRAMFILES32\Sun" 196 247 !else ; 64-bit … … 208 259 !insertmacro Uninstall_Sun "" 209 260 210 ; This function cleans up an old xVM Sun installation 261 211 262 !macro Uninstall_SunXVM un 263 ;; 264 ; Function to clean up an old Sun xVM installation. 265 ; 266 ; Input: 267 ; None 268 ; Output: 269 ; None 270 ; 212 271 Function ${un}Uninstall_SunXVM 213 272 … … 216 275 Push $2 217 276 218 ; Get current installation path 277 ; Get current installation path. 219 278 ReadRegStr $0 HKLM "SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\Sun xVM VirtualBox Guest Additions" "UninstallString" 279 StrCmp $0 "" exit 280 281 ; Extract path. 282 Push "$0" ; String 283 Push "\" ; SubString 284 Push "<" ; SearchDirection 285 Push "<" ; StrInclusionDirection 286 Push "0" ; IncludeSubString 287 Push "0" ; Loops 288 Push "0" ; CaseSensitive 289 Call ${un}StrStrAdv 290 Pop $1 ; $1 only contains the full path 291 292 StrCmp $1 "" exit 293 294 ; Save current i8042prt info to new uninstall registry path. 295 ReadRegStr $0 HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\Sun xVM VirtualBox Guest Additions" ${REGISTRY_VAL_ORG_MOUSE_PATH} 296 WriteRegStr HKLM "${REGISTRY_KEY_UNINST_PRODUCT}" ${REGISTRY_VAL_ORG_MOUSE_PATH} $0 297 298 ; Try to wipe current installation directory. 299 Push $1 ; Push uninstaller path to stack. 300 Call ${un}Uninstall_WipeInstallationDirectory 301 Pop $2 ; Get uninstaller exit code from stack. 302 StrCmp $2 0 common exit ; Only process common part if exit code is 0, otherwise exit. 303 304 common: 305 306 ; Make sure everything is cleaned up in case the old uninstaller did forget something. 307 DeleteRegKey HKLM "SOFTWARE\Sun\xVM VirtualBox Guest Additions" 308 DeleteRegKey /ifempty HKLM "SOFTWARE\Sun" 309 DeleteRegKey HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\Sun xVM VirtualBox Guest Additions" 310 Delete /REBOOTOK "$1\netamd.inf" 311 Delete /REBOOTOK "$1\pcntpci5.cat" 312 Delete /REBOOTOK "$1\PCNTPCI5.sys" 313 314 ; Try to remove old installation directory if empty. 315 RMDir /r /REBOOTOK "$SMPROGRAMS\Sun xVM VirtualBox Guest Additions" 316 RMDir /REBOOTOK "$1" 317 318 ; Delete vendor installation directory (only if completely empty). 319 !if $%KBUILD_TARGET_ARCH% == "x86" 320 RMDir /REBOOTOK "$PROGRAMFILES32\Sun" 321 !else 322 RMDir /REBOOTOK "$PROGRAMFILES64\Sun" 323 !endif 324 325 ; Get original mouse driver info and restore it. 326 ;ReadRegStr $0 "${REGISTRY_KEY_UNINST_ROOT}" "${REGISTRY_KEY_UNINST_PRODUCT}" "${REGISTRY_VAL_ORG_MOUSE_PATH}" 327 ;WriteRegStr HKLM "SYSTEM\CurrentControlSet\Services\i8042prt" "ImagePath" $0 328 ;Delete "$SYSDIR\drivers\VBoxMouseNT.sys" 329 330 exit: 331 332 Pop $2 333 Pop $1 334 Pop $0 335 336 FunctionEnd 337 !macroend 338 !insertmacro Uninstall_SunXVM "" 339 340 341 !macro Uninstall_Innotek un 342 ;; 343 ; Function to clean up an old innotek installation. 344 ; 345 ; Input: 346 ; None 347 ; Output: 348 ; None 349 ; 350 Function ${un}Uninstall_Innotek 351 352 Push $0 353 Push $1 354 Push $2 355 356 ReadRegStr $0 HKLM "SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\innotek VirtualBox Guest Additions" "UninstallString" 220 357 StrCmp $0 "" exit 221 358 … … 233 370 StrCmp $1 "" exit 234 371 235 ; Save current i8042prt info to new uninstall registry path 236 ReadRegStr $0 HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\ Sun xVM VirtualBox Guest Additions" ${ORG_MOUSE_PATH}237 WriteRegStr HKLM "${ PRODUCT_UNINST_KEY}" ${ORG_MOUSE_PATH}$0238 239 ; Try to wipe current installation directory 240 Push $1 ; Push uninstaller path to stack 372 ; Save current i8042prt info to new uninstall registry path. 373 ReadRegStr $0 HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\innotek VirtualBox Guest Additions" "${REGISTRY_VAL_ORG_MOUSE_PATH}" 374 WriteRegStr HKLM "${REGISTRY_KEY_UNINST_PRODUCT}" "${REGISTRY_VAL_ORG_MOUSE_PATH}" $0 375 376 ; Try to wipe current installation directory. 377 Push $1 ; Push uninstaller path to stack. 241 378 Call ${un}Uninstall_WipeInstallationDirectory 242 Pop $2 ; Get uninstaller exit code from stack 243 StrCmp $2 0 common exit ; Only process common part if exit code is 0, otherwise exit 379 Pop $2 ; Get uninstaller exit code from stack. 380 StrCmp $2 0 common exit ; Only process common part if exit code is 0, otherwise exit. 244 381 245 382 common: 246 383 247 ; Make sure everything is cleaned up in case the old uninstaller did forget something 248 DeleteRegKey HKLM "SOFTWARE\Sun\xVM VirtualBox Guest Additions" 249 DeleteRegKey /ifempty HKLM "SOFTWARE\Sun" 250 DeleteRegKey HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\Sun xVM VirtualBox Guest Additions" 251 Delete /REBOOTOK "$1\netamd.inf" 252 Delete /REBOOTOK "$1\pcntpci5.cat" 253 Delete /REBOOTOK "$1\PCNTPCI5.sys" 254 255 ; Try to remove old installation directory if empty 256 RMDir /r /REBOOTOK "$SMPROGRAMS\Sun xVM VirtualBox Guest Additions" 257 RMDir /REBOOTOK "$1" 258 259 ; Delete vendor installation directory (only if completely empty) 260 !if $%KBUILD_TARGET_ARCH% == "x86" ; 32-bit 261 RMDir /REBOOTOK "$PROGRAMFILES32\Sun" 262 !else ; 64-bit 263 RMDir /REBOOTOK "$PROGRAMFILES64\Sun" 264 !endif 265 266 ; Get original mouse driver info and restore it 267 ;ReadRegStr $0 ${PRODUCT_UNINST_ROOT_KEY} "${PRODUCT_UNINST_KEY}" ${ORG_MOUSE_PATH} 268 ;WriteRegStr HKLM "SYSTEM\CurrentControlSet\Services\i8042prt" "ImagePath" $0 269 ;Delete "$SYSDIR\drivers\VBoxMouseNT.sys" 270 271 exit: 272 273 Pop $2 274 Pop $1 275 Pop $0 276 277 FunctionEnd 278 !macroend 279 !insertmacro Uninstall_SunXVM "" 280 281 ; This function cleans up an old innotek installation 282 !macro Uninstall_Innotek un 283 Function ${un}Uninstall_Innotek 284 285 Push $0 286 Push $1 287 Push $2 288 289 ReadRegStr $0 HKLM "SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\innotek VirtualBox Guest Additions" "UninstallString" 290 StrCmp $0 "" exit 291 292 ; Extract path 293 Push "$0" ; String 294 Push "\" ; SubString 295 Push "<" ; SearchDirection 296 Push "<" ; StrInclusionDirection 297 Push "0" ; IncludeSubString 298 Push "0" ; Loops 299 Push "0" ; CaseSensitive 300 Call ${un}StrStrAdv 301 Pop $1 ; $1 only contains the full path 302 303 StrCmp $1 "" exit 304 305 ; Save current i8042prt info to new uninstall registry path 306 ReadRegStr $0 HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\innotek VirtualBox Guest Additions" ${ORG_MOUSE_PATH} 307 WriteRegStr HKLM "${PRODUCT_UNINST_KEY}" ${ORG_MOUSE_PATH} $0 308 309 ; Try to wipe current installation directory 310 Push $1 ; Push uninstaller path to stack 311 Call ${un}Uninstall_WipeInstallationDirectory 312 Pop $2 ; Get uninstaller exit code from stack 313 StrCmp $2 0 common exit ; Only process common part if exit code is 0, otherwise exit 314 315 common: 316 317 ; Remove left over files which were not entirely cached by the formerly running 318 ; uninstaller 384 ; Remove left over files which were not entirely cached by the formerly running uninstaller. 319 385 DeleteRegKey HKLM "SOFTWARE\innotek\VirtualBox Guest Additions" 320 386 DeleteRegKey HKLM "SOFTWARE\innotek" … … 343 409 Delete /REBOOTOK "$1\VBoxVideo.sys" 344 410 345 ; Try to remove old installation directory if empty 411 ; Try to remove old installation directory if empty. 346 412 RMDir /r /REBOOTOK "$SMPROGRAMS\innotek VirtualBox Guest Additions" 347 413 RMDir /REBOOTOK "$1" 348 414 349 ; Delete vendor installation directory (only if completely empty) 415 ; Delete vendor installation directory (only if completely empty). 350 416 !if $%KBUILD_TARGET_ARCH% == "x86" ; 32-bit 351 417 RMDir /REBOOTOK "$PROGRAMFILES32\innotek" … … 354 420 !endif 355 421 356 ; Get original mouse driver info and restore it 357 ;ReadRegStr $0 ${PRODUCT_UNINST_ROOT_KEY} "${PRODUCT_UNINST_KEY}" ${ORG_MOUSE_PATH}422 ; Get original mouse driver info and restore it. 423 ;ReadRegStr $0 "${REGISTRY_KEY_UNINST_ROOT}" "${REGISTRY_KEY_UNINST_PRODUCT}" "${REGISTRY_VAL_ORG_MOUSE_PATH}" 358 424 ;WriteRegStr HKLM "SYSTEM\CurrentControlSet\Services\i8042prt" "ImagePath" $0 359 ;Delete "$SYSDIR\drivers\VBoxMouseNT.sys" 425 ;Delete "$SYSDIR\drivers\VBoxMouseNT.sys". 360 426 361 427 exit: … … 368 434 !macroend 369 435 !insertmacro Uninstall_Innotek "" 436 437 438 ;; 439 ; Handles uninstallation of legacy Guest Additions and/or performs necessary migration steps. 440 ; 441 ; Input: 442 ; None 443 ; Output: 444 ; None 445 ; 446 Function HandleOldGuestAdditions 447 448 Push $0 449 Push $1 450 Push $2 451 452 ${LogVerbose} "Checking for old Guest Additions ..." 453 454 ; Check for old "Sun VirtualBox Guest Additions" 455 ; - before rebranding to Oracle 456 ReadRegStr $0 HKLM "SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\Sun VirtualBox Guest Additions" "UninstallString" 457 ${If} $0 == "" 458 goto sun_xvm_check ; If string is empty, Sun additions are probably not installed (anymore) 459 ${EndIf} 460 461 MessageBox MB_YESNO $(VBOX_SUN_FOUND) /SD IDYES IDYES sun_uninstall 462 Pop $2 463 Pop $1 464 Pop $0 465 MessageBox MB_ICONSTOP $(VBOX_SUN_ABORTED) /SD IDOK 466 Quit 467 468 sun_uninstall: 469 470 Call Uninstall_Sun 471 Goto migration_check 472 473 sun_xvm_check: 474 475 ; Check for old "Sun xVM VirtualBox Guest Additions" 476 ; - before getting rid of the "xVM" namespace 477 ReadRegStr $0 HKLM "SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\Sun xVM VirtualBox Guest Additions" "UninstallString" 478 ${If} $0 == "" 479 goto innotek_check ; If string is empty, Sun xVM additions are probably not installed (anymore). 480 ${EndIf} 481 482 MessageBox MB_YESNO $(VBOX_SUN_FOUND) /SD IDYES IDYES sun_xvm_uninstall 483 Pop $2 484 Pop $1 485 Pop $0 486 MessageBox MB_ICONSTOP $(VBOX_SUN_ABORTED) /SD IDOK 487 Quit 488 489 sun_xvm_uninstall: 490 491 Call Uninstall_SunXVM 492 Goto migration_check 493 494 innotek_check: 495 496 ; Check for old "innotek" Guest Additions" before rebranding to "Sun". 497 ReadRegStr $0 HKLM "SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\innotek VirtualBox Guest Additions" "UninstallString" 498 ${If} $0 == "" 499 goto migration_check ; If string is empty, innotek Guest Additions are probably not installed (anymore). 500 ${EndIf} 501 502 MessageBox MB_YESNO $(VBOX_INNOTEK_FOUND) /SD IDYES IDYES innotek_uninstall 503 Pop $2 504 Pop $1 505 Pop $0 506 MessageBox MB_ICONSTOP $(VBOX_INNOTEK_ABORTED) /SD IDOK 507 Quit 508 509 innotek_uninstall: 510 511 Call Uninstall_Innotek 512 Goto migration_check 513 514 migration_check: 515 516 ${If} $g_strAddVerMaj != "" 517 goto migration_perform 518 ${EndIf} 519 goto done 520 521 migration_perform: 522 523 ${LogVerbose} "Running migration steps ..." 524 525 ; Migrate old(er) installation directories (< 7.2) to new structure. 526 Call Uninstall_Before7_2 527 528 done: 529 530 Pop $2 531 Pop $1 532 Pop $0 533 534 FunctionEnd
Note:
See TracChangeset
for help on using the changeset viewer.