Changeset 44459 in vbox for trunk/src/VBox/Additions/WINNT
- Timestamp:
- Jan 30, 2013 11:23:57 AM (12 years ago)
- Location:
- trunk/src/VBox/Additions/WINNT/Installer
- Files:
-
- 1 added
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Additions/WINNT/Installer/VBoxGuestAdditions.nsi
r44420 r44459 241 241 ; Platform parts of this installer 242 242 !include "VBoxGuestAdditionsLog.nsh" 243 !include "VBoxGuestAdditionsExternal.nsh" 243 244 !include "VBoxGuestAdditionsCommon.nsh" 244 245 !if $%BUILD_TARGET_ARCH% == "x86" ; 32-bit only … … 757 758 758 759 ${If} ${FileExists} "$g_strSystemDir\takeown.exe" 759 nsExec::ExecToLog '"$g_strSystemDir\takeown.exe" /F "$0"' 760 Pop $1 ; Ret value 761 ${LogVerbose} "WRP: Taking ownership for $0 returned: $1" 760 ${CmdExecute} "$\"$g_strSystemDir\takeown.exe$\" /F $\"$0$\"" "true" 762 761 ${Else} 763 762 ${LogVerbose} "WRP: Warning: takeown.exe not found, skipping" -
trunk/src/VBox/Additions/WINNT/Installer/VBoxGuestAdditionsCommon.nsh
r44352 r44459 483 483 Function ${un}AbortShutdown 484 484 485 Push $0486 487 ; Try to abort the shutdown488 nsExec::ExecToLog '"$g_strSystemDir\shutdown.exe" -a' $0489 490 Pop $0485 ${If} ${FileExists} "$g_strSystemDir\shutdown.exe" 486 ; Try to abort the shutdown 487 ${CmdExecute} "$\"$g_strSystemDir\shutdown.exe$\" -a" "true" 488 ${Else} 489 ${LogVerbose} "Shutting down not supported: Binary $\"$g_strSystemDir\shutdown.exe$\" not found" 490 ${EndIf} 491 491 492 492 FunctionEnd -
trunk/src/VBox/Additions/WINNT/Installer/VBoxGuestAdditionsNT4.nsh
r44417 r44459 140 140 141 141 ; Install guest driver 142 nsExec::ExecToLog '"$INSTDIR\VBoxDrvInst.exe" service create "VBoxGuest" "VBoxGuest Support Driver" 1 1 "$SYSDIR\drivers\VBoxGuestNT.sys" "Base"'142 ${CmdExecute} "$\"$INSTDIR\VBoxDrvInst.exe$\" service create $\"VBoxGuest$\" $\"VBoxGuest Support Driver$\" 1 1 $\"$SYSDIR\drivers\VBoxGuestNT.sys$\" $\"Base$\"" "false" 143 143 144 144 ; Bugfix: Set "Start" to 1, otherwise, VBoxGuest won't start on boot-up! … … 151 151 152 152 ; Video driver 153 nsExec::ExecToLog '"$INSTDIR\VBoxGuestDrvInst.exe" /i' 154 Pop $0 ; Ret value 155 IntCmp $0 0 +1 error error ; Check ret value (0=OK, 1=Error) 153 ${CmdExecute} "$\"$INSTDIR\VBoxGuestDrvInst.exe$\" /i" "false" 156 154 157 155 ${LogVerbose} "Installing VirtualBox service ..." … … 159 157 ; Create the VBoxService service 160 158 ; No need to stop/remove the service here! Do this only on uninstallation! 161 nsExec::ExecToLog '"$INSTDIR\VBoxDrvInst.exe" service create "VBoxService" "VirtualBox Guest Additions Service" 16 2 "system32\VBoxServiceNT.exe" "Base"'159 ${CmdExecute} "$\"$INSTDIR\VBoxDrvInst.exe$\" service create $\"VBoxService$\" $\"VirtualBox Guest Additions Service$\" 16 2 $\"system32\VBoxServiceNT.exe$\" $\"Base$\"" "false" 162 160 163 161 ; Create the Shared Folders service ... … … 177 175 178 176 ; Add the shared folders network provider 179 ;nsExec::ExecToLog '"$INSTDIR\VBoxDrvInst.exe" netprovider add VBoxSF' 180 ;Pop $0 ; Ret value 181 ;IntCmp $0 0 +1 error error ; Check ret value (0=OK, 1=Error) 177 ;${CmdExecute} "$\"$INSTDIR\VBoxDrvInst.exe$\" netprovider add VBoxSF" "false" 182 178 183 179 Goto done … … 227 223 228 224 ; Remove the guest driver service 229 nsExec::ExecToLog '"$INSTDIR\VBoxDrvInst.exe" service delete VBoxGuest'225 ${CmdExecute} "$\"$INSTDIR\VBoxDrvInst.exe$\" service delete VBoxGuest" "true" 230 226 Delete /REBOOTOK "$SYSDIR\drivers\VBoxGuestNT.sys" 231 227 232 228 ; Delete the VBoxService service 233 229 Call ${un}StopVBoxService 234 nsExec::ExecToLog '"$INSTDIR\VBoxDrvInst.exe" service delete VBoxService' 235 Pop $0 ; Ret value 230 ${CmdExecute} "$\"$INSTDIR\VBoxDrvInst.exe$\" service delete VBoxService" "true" 236 231 DeleteRegValue HKLM "Software\Microsoft\Windows\CurrentVersion\Run" "VBoxService" 237 232 Delete /REBOOTOK "$SYSDIR\VBoxServiceNT.exe" … … 248 243 249 244 ; Delete the VBoxVideo service 250 nsExec::ExecToLog '"$INSTDIR\VBoxDrvInst.exe" service delete VBoxVideo'245 ${CmdExecute} "$\"$INSTDIR\VBoxDrvInst.exe$\" service delete VBoxVideo" "true" 251 246 252 247 ; Delete the VBox video driver files -
trunk/src/VBox/Additions/WINNT/Installer/VBoxGuestAdditionsW2KXP.nsh
r44417 r44459 129 129 130 130 ; Write the new value in the adapter config (VBoxVideo.sys) using hex values in binary format 131 nsExec::ExecToLog '"$INSTDIR\VBoxDrvInst.exe" registry write HKLM $reg_path_device CustomXRes REG_BIN $g_iScreenX DWORD'132 nsExec::ExecToLog '"$INSTDIR\VBoxDrvInst.exe" registry write HKLM $reg_path_device CustomYRes REG_BIN $g_iScreenY DWORD'133 nsExec::ExecToLog '"$INSTDIR\VBoxDrvInst.exe" registry write HKLM $reg_path_device CustomBPP REG_BIN $g_iScreenBpp DWORD'131 ${CmdExecute} "$\"$INSTDIR\VBoxDrvInst.exe$\" registry write HKLM $reg_path_device CustomXRes REG_BIN $g_iScreenX DWORD" "false" 132 ${CmdExecute} "$\"$INSTDIR\VBoxDrvInst.exe$\" registry write HKLM $reg_path_device CustomYRes REG_BIN $g_iScreenY DWORD" "false" 133 ${CmdExecute} "$\"$INSTDIR\VBoxDrvInst.exe$\" registry write HKLM $reg_path_device CustomBPP REG_BIN $g_iScreenBpp DWORD" "false" 134 134 135 135 ; ... and tell Windows to use that mode on next start! … … 338 338 339 339 ${LogVerbose} "Turning off WHQL protection..." 340 nsExec::ExecToLog '"$INSTDIR\VBoxWHQLFake.exe" "ignore"'340 ${CmdExecute} "$\"$INSTDIR\VBoxWHQLFake.exe$\" $\"ignore$\"" "true" 341 341 342 342 exit: … … 352 352 353 353 ${LogVerbose} "Turning back on WHQL protection..." 354 nsExec::ExecToLog '"$INSTDIR\VBoxWHQLFake.exe" "warn"'354 ${CmdExecute} "$\"$INSTDIR\VBoxWHQLFake.exe$\" $\"warn$\"" "true" 355 355 356 356 exit: … … 384 384 ${If} $g_bNoGuestDrv == "false" 385 385 ${LogVerbose} "Installing guest driver ..." 386 nsExec::ExecToLog '"$INSTDIR\VBoxDrvInst.exe" driver install "$INSTDIR\VBoxGuest.inf" "$INSTDIR\install_drivers.log"' 387 Pop $0 ; Ret value 388 ${LogVerbose} "Guest driver returned: $0" 389 IntCmp $0 0 +1 error error ; Check ret value (0=OK, 1=Error) 386 ${CmdExecute} "$\"$INSTDIR\VBoxDrvInst.exe$\" driver install $\"$INSTDIR\VBoxGuest.inf$\" $\"$INSTDIR\install_drivers.log$\"" "false" 390 387 ${Else} 391 388 ${LogVerbose} "Guest driver installation skipped!" … … 397 394 ${If} $g_strWinVersion == "8" 398 395 ${LogVerbose} "Installing WDDM video driver for Windows 8..." 399 nsExec::ExecToLog '"$INSTDIR\VBoxDrvInst.exe" driver install "$INSTDIR\VBoxVideoW8.inf" "$INSTDIR\install_drivers.log"'396 ${CmdExecute} "$\"$INSTDIR\VBoxDrvInst.exe$\" driver install $\"$INSTDIR\VBoxVideoW8.inf$\" $\"$INSTDIR\install_drivers.log$\"" "false" 400 397 ${Else} 401 398 !endif 402 399 ${LogVerbose} "Installing WDDM video driver for Windows Vista and 7..." 403 nsExec::ExecToLog '"$INSTDIR\VBoxDrvInst.exe" driver install "$INSTDIR\VBoxVideoWddm.inf" "$INSTDIR\install_drivers.log"'400 ${CmdExecute} "$\"$INSTDIR\VBoxDrvInst.exe$\" driver install $\"$INSTDIR\VBoxVideoWddm.inf$\" $\"$INSTDIR\install_drivers.log$\"" "false" 404 401 !if $%VBOX_WITH_WDDM_W8% == "1" 405 402 ${EndIf} … … 407 404 ${Else} 408 405 ${LogVerbose} "Installing video driver ..." 409 nsExec::ExecToLog '"$INSTDIR\VBoxDrvInst.exe" driver install "$INSTDIR\VBoxVideo.inf" "$INSTDIR\install_drivers.log"'406 ${CmdExecute} "$\"$INSTDIR\VBoxDrvInst.exe$\" driver install $\"$INSTDIR\VBoxVideo.inf$\" $\"$INSTDIR\install_drivers.log$\"" "false" 410 407 ${EndIf} 411 Pop $0 ; Ret value412 ${LogVerbose} "Video driver returned: $0"413 IntCmp $0 0 +1 error error ; Check ret value (0=OK, 1=Error)414 408 ${Else} 415 409 ${LogVerbose} "Video driver installation skipped!" … … 421 415 ; so this .INF file needs to be installed using "InstallHinfSection" which is implemented 422 416 ; with VBoxDrvInst's "driver executeinf" routine 423 nsExec::ExecToLog '"$INSTDIR\VBoxDrvInst.exe" driver executeinf "$INSTDIR\VBoxMouse.inf"' 424 Pop $0 ; Ret value 425 ${LogVerbose} "Mouse driver returned: $0" 426 IntCmp $0 0 +1 error error ; Check ret value (0=OK, 1=Error) 417 ${CmdExecute} "$\"$INSTDIR\VBoxDrvInst.exe$\" driver executeinf $\"$INSTDIR\VBoxMouse.inf$\"" "false" 427 418 ${Else} 428 419 ${LogVerbose} "Mouse driver installation skipped!" … … 432 423 ; No need to stop/remove the service here! Do this only on uninstallation! 433 424 ${LogVerbose} "Installing VirtualBox service ..." 434 nsExec::ExecToLog '"$INSTDIR\VBoxDrvInst.exe" service create "VBoxService" "VirtualBox Guest Additions Service" 16 2 "system32\VBoxService.exe" "Base"' 435 Pop $0 ; Ret value 436 ${LogVerbose} "VBoxService returned: $0" 425 ${CmdExecute} "$\"$INSTDIR\VBoxDrvInst.exe$\" service create $\"VBoxService$\" $\"VirtualBox Guest Additions Service$\" 16 2 $\"system32\VBoxService.exe$\" $\"Base$\"" "false" 437 426 438 427 ; Set service description … … 445 434 ; Create the Shared Folders service ... 446 435 ; No need to stop/remove the service here! Do this only on uninstallation! 447 nsExec::ExecToLog '"$INSTDIR\VBoxDrvInst.exe" service create "VBoxSF" "VirtualBox Shared Folders" 2 1 "system32\drivers\VBoxSF.sys" "NetworkProvider"'436 ${CmdExecute} "$\"$INSTDIR\VBoxDrvInst.exe$\" service create $\"VBoxSF$\" $\"VirtualBox Shared Folders$\" 2 1 $\"system32\drivers\VBoxSF.sys$\" $\"NetworkProvider$\"" "false" 448 437 449 438 ; ... and the link to the network provider … … 453 442 454 443 ; Add default network providers (if not present or corrupted) 455 nsExec::ExecToLog '"$INSTDIR\VBoxDrvInst.exe" netprovider add WebClient'456 nsExec::ExecToLog '"$INSTDIR\VBoxDrvInst.exe" netprovider add LanmanWorkstation'457 nsExec::ExecToLog '"$INSTDIR\VBoxDrvInst.exe" netprovider add RDPNP'444 ${CmdExecute} "$\"$INSTDIR\VBoxDrvInst.exe$\" netprovider add WebClient" "false" 445 ${CmdExecute} "$\"$INSTDIR\VBoxDrvInst.exe$\" netprovider add LanmanWorkstation" "false" 446 ${CmdExecute} "$\"$INSTDIR\VBoxDrvInst.exe$\" netprovider add RDPNP" "false" 458 447 459 448 ; Add the shared folders network provider 460 449 ${LogVerbose} "Adding network provider (Order = $g_iSfOrder) ..." 461 nsExec::ExecToLog '"$INSTDIR\VBoxDrvInst.exe" netprovider add VBoxSF $g_iSfOrder' 462 Pop $0 ; Ret value 463 IntCmp $0 0 +1 error error ; Check ret value (0=OK, 1=Error) 450 ${CmdExecute} "$\"$INSTDIR\VBoxDrvInst.exe$\" netprovider add VBoxSF $g_iSfOrder" "false" 464 451 465 452 !if $%VBOX_WITH_CROGL% == "1" … … 492 479 Goto done 493 480 494 error:495 496 Abort "ERROR: Could not install files for Windows 2000 / XP / Vista! Installation aborted."497 498 481 done: 499 482 … … 607 590 ; Remove VirtualBox video driver 608 591 ${LogVerbose} "Uninstalling video driver ..." 609 nsExec::ExecToLog '"$INSTDIR\VBoxDrvInst.exe" driver uninstall "$INSTDIR\VBoxVideo.inf' 610 Pop $0 ; Ret value 611 ; @todo Add error handling here! 612 nsExec::ExecToLog '"$INSTDIR\VBoxDrvInst.exe" service delete VBoxVideo' 592 ${CmdExecute} "$\"$INSTDIR\VBoxDrvInst.exe$\" driver uninstall $\"$INSTDIR\VBoxVideo.inf$\"" "true" 593 ${CmdExecute} "$\"$INSTDIR\VBoxDrvInst.exe$\" service delete VBoxVideo" "true" 613 594 Delete /REBOOTOK "$g_strSystemDir\drivers\VBoxVideo.sys" 614 595 Delete /REBOOTOK "$g_strSystemDir\VBoxDisp.dll" … … 619 600 !if $%VBOX_WITH_WDDM_W8% == "1" 620 601 ${LogVerbose} "Uninstalling WDDM video driver for Windows 8..." 621 nsExec::ExecToLog '"$INSTDIR\VBoxDrvInst.exe" driver uninstall "$INSTDIR\VBoxVideoW8.inf"' 622 Pop $0 ; Ret value 623 ; Always try to remove both VBoxVideoW8 & VBoxVideoWddm services no matter what is installed currently 624 nsExec::ExecToLog '"$INSTDIR\VBoxDrvInst.exe" service delete VBoxVideoW8' 625 Pop $0 ; Ret value 602 ${CmdExecute} "$\"$INSTDIR\VBoxDrvInst.exe$\" driver uninstall $\"$INSTDIR\VBoxVideoW8.inf$\"" "true" 603 ${CmdExecute} "$\"$INSTDIR\VBoxDrvInst.exe$\" service delete VBoxVideoW8" "true" 626 604 ;misha> @todo driver file removal (as well as service removal) should be done as driver package uninstall 627 605 ; could be done with "VBoxDrvInst.exe /u", e.g. by passing additional arg to it denoting that driver package is to be uninstalled … … 630 608 631 609 ${LogVerbose} "Uninstalling WDDM video driver for Windows Vista and 7..." 632 nsExec::ExecToLog '"$INSTDIR\VBoxDrvInst.exe" driver uninstall "$INSTDIR\VBoxVideoWddm.inf"' 633 Pop $0 ; Ret value 610 ${CmdExecute} "$\"$INSTDIR\VBoxDrvInst.exe$\" driver uninstall $\"$INSTDIR\VBoxVideoWddm.inf$\"" "true" 634 611 ; Always try to remove both VBoxVideoWddm & VBoxVideo services no matter what is installed currently 635 nsExec::ExecToLog '"$INSTDIR\VBoxDrvInst.exe" service delete VBoxVideoWddm' 636 Pop $0 ; Ret value 612 ${CmdExecute} "$\"$INSTDIR\VBoxDrvInst.exe$\" service delete VBoxVideoWddm" "true" 637 613 ;misha> @todo driver file removal (as well as service removal) should be done as driver package uninstall 638 614 ; could be done with "VBoxDrvInst.exe /u", e.g. by passing additional arg to it denoting that driver package is to be uninstalled … … 732 708 ; Remove mouse driver 733 709 ${LogVerbose} "Removing mouse driver ..." 734 nsExec::ExecToLog '"$INSTDIR\VBoxDrvInst.exe" service delete VBoxMouse' 735 Pop $0 ; Ret value 710 ${CmdExecute} "$\"$INSTDIR\VBoxDrvInst.exe$\" service delete VBoxMouse" "true" 736 711 Delete /REBOOTOK "$g_strSystemDir\drivers\VBoxMouse.sys" 737 nsExec::ExecToLog '"$INSTDIR\VBoxDrvInst.exe" registry delmultisz "SYSTEM\CurrentControlSet\Control\Class\{4D36E96F-E325-11CE-BFC1-08002BE10318}" "UpperFilters" "VBoxMouse"' 738 Pop $0 ; Ret value 739 ; @todo Add error handling here! 712 ${CmdExecute} "$\"$INSTDIR\VBoxDrvInst.exe$\" registry delmultisz $\"SYSTEM\CurrentControlSet\Control\Class\{4D36E96F-E325-11CE-BFC1-08002BE10318}$\" $\"UpperFilters$\" $\"VBoxMouse$\"" "true" 740 713 741 714 ; Delete the VBoxService service 742 715 Call ${un}StopVBoxService 743 nsExec::ExecToLog '"$INSTDIR\VBoxDrvInst.exe" service delete VBoxService' 744 Pop $0 ; Ret value 716 ${CmdExecute} "$\"$INSTDIR\VBoxDrvInst.exe$\" service delete VBoxService" "true" 745 717 DeleteRegValue HKLM "Software\Microsoft\Windows\CurrentVersion\Run" "VBoxService" 746 718 Delete /REBOOTOK "$g_strSystemDir\VBoxService.exe" … … 761 733 ; Remove guest driver 762 734 ${LogVerbose} "Removing guest driver ..." 763 nsExec::ExecToLog '"$INSTDIR\VBoxDrvInst.exe" driver uninstall "$INSTDIR\VBoxGuest.inf"' 764 Pop $0 ; Ret value 765 ; @todo Add error handling here! 766 767 nsExec::ExecToLog '"$INSTDIR\VBoxDrvInst.exe" service delete VBoxGuest' 768 Pop $0 ; Ret value 735 ${CmdExecute} "$\"$INSTDIR\VBoxDrvInst.exe$\" driver uninstall $\"$INSTDIR\VBoxGuest.inf$\"" "true" 736 737 ${CmdExecute} "$\"$INSTDIR\VBoxDrvInst.exe$\" service delete VBoxGuest" "true" 769 738 Delete /REBOOTOK "$g_strSystemDir\drivers\VBoxGuest.sys" 770 739 Delete /REBOOTOK "$g_strSystemDir\VBCoInst.dll" ; Deprecated, does not get installed anymore … … 776 745 ; Remove shared folders driver 777 746 ${LogVerbose} "Removing shared folders driver ..." 778 nsExec::ExecToLog '"$INSTDIR\VBoxDrvInst.exe" netprovider remove VBoxSF' 779 Pop $0 ; Ret value 780 nsExec::ExecToLog '"$INSTDIR\VBoxDrvInst.exe" service delete VBoxSF' 781 Pop $0 ; Ret value 747 ${CmdExecute} "$\"$INSTDIR\VBoxDrvInst.exe$\" netprovider remove VBoxSF" "true" 748 ${CmdExecute} "$\"$INSTDIR\VBoxDrvInst.exe$\" service delete VBoxSF" "true" 782 749 Delete /REBOOTOK "$g_strSystemDir\VBoxMRXNP.dll" ; The network provider DLL will be locked 783 750 !if $%BUILD_TARGET_ARCH% == "amd64"
Note:
See TracChangeset
for help on using the changeset viewer.