Changeset 44352 in vbox for trunk/src/VBox/Additions/WINNT/Installer/VBoxGuestAdditions.nsi
- Timestamp:
- Jan 24, 2013 12:05:12 PM (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Additions/WINNT/Installer/VBoxGuestAdditions.nsi
r44341 r44352 5 5 6 6 ; 7 ; Copyright (C) 2012 Oracle Corporation7 ; Copyright (C) 2012-2013 Oracle Corporation 8 8 ; 9 9 ; This file is part of VirtualBox Open Source Edition (OSE), as … … 240 240 241 241 ; Platform parts of this installer 242 !include "VBoxGuestAdditionsLog.nsh" 242 243 !include "VBoxGuestAdditionsCommon.nsh" 243 244 !if $%BUILD_TARGET_ARCH% == "x86" ; 32-bit only 244 !include "VBoxGuestAdditionsNT4.nsh"245 !include "VBoxGuestAdditionsNT4.nsh" 245 246 !endif 246 247 !include "VBoxGuestAdditionsW2KXP.nsh" … … 445 446 done: 446 447 447 IfSilent 0 +2 448 LogText "Installer is in silent mode!" 449 450 LogText "Property: XRes: $g_iScreenX" 451 LogText "Property: YRes: $g_iScreenY" 452 LogText "Property: BPP: $g_iScreenBpp" 453 LogText "Property: Logging enabled: $g_bLogEnable" 454 448 !ifdef _DEBUG 449 ${LogVerbose} "Property: XRes: $g_iScreenX" 450 ${LogVerbose} "Property: YRes: $g_iScreenY" 451 ${LogVerbose} "Property: BPP: $g_iScreenBpp" 452 ${LogVerbose} "Property: Logging enabled: $g_bLogEnable" 453 !endif 454 455 455 exit: 456 456 … … 545 545 Push $1 546 546 547 DetailPrint "Checking for installed components ..." 548 547 ${LogVerbose} "Checking for installed components ..." 548 StrCpy $1 "" 549 549 550 Call SetAppMode64 550 551 … … 553 554 ReadRegStr $0 HKLM "SOFTWARE\Microsoft\Windows NT\CurrentVersion\WinLogon" "GinaDLL" 554 555 ${If} $0 == "VBoxGINA.dll" 555 StrCpy $g_bWithAutoLogon "true" 556 StrCpy $1 "1" 557 ${EndIf} 558 559 ReadRegStr $0 HKLM "SOFTWARE\Microsoft\Windows\CurrentVersion\Authentication\Credential Providers\{275D3BCC-22BB-4948-A7F6-3A3054EBA92B}" "" 560 ${If} $0 == "VBoxCredProv.dll" 561 StrCpy $g_bWithAutoLogon "true" 562 StrCpy $1 "1" 563 ${EndIf} 564 565 ${If} $1 == "1" 566 DetailPrint "Auto-logon support was not installed previously" 567 ${EndIf} 568 569 ${If} $g_bWithAutoLogon == "true" 570 DetailPrint "Found already installed auto-logon support ..." 556 StrCpy $1 "GINA" 557 ${Else} 558 ReadRegStr $0 HKLM "SOFTWARE\Microsoft\Windows\CurrentVersion\Authentication\Credential Providers\{275D3BCC-22BB-4948-A7F6-3A3054EBA92B}" "" 559 ${If} $0 == "VBoxCredProv" 560 StrCpy $1 "Credential Provider" 561 ${EndIf} 562 ${EndIf} 563 564 !ifdef _DEBUG 565 ${LogVerbose} "Auto-logon module: $0" 566 !endif 567 568 ${IfNot} $1 == "" 569 ${LogVerbose} "Auto-logon support ($1) was installed previously" 570 StrCpy $g_bWithAutoLogon "true" ; Force update 571 ${Else} 572 ${LogVerbose} "Auto-logon support was not installed previously" 571 573 ${EndIf} 572 574 … … 580 582 581 583 SectionIn RO ; Section cannot be unselected (read-only) 582 583 Push "${PRODUCT_NAME} update started, please wait ..." 584 Push 0 ; Message type = info 585 Call WriteLogVBoxTray 584 ${If} $g_bPostInstallStatus == "true" 585 ${LogToVBoxTray} "0" "${PRODUCT_NAME} update started, please wait ..." 586 ${EndIf} 586 587 587 588 SetOutPath "$INSTDIR" … … 592 593 StrCpy $g_strSystemDir "$SYSDIR" 593 594 594 Call EnableLog595 596 DetailPrint"Version: $%VBOX_VERSION_STRING% (Rev $%VBOX_SVN_REV%)"595 ${LogVerbose} "$g_bLogEnable" 596 597 ${LogVerbose} "Version: $%VBOX_VERSION_STRING% (Rev $%VBOX_SVN_REV%)" 597 598 ${If} $g_strAddVerMaj != "" 598 DetailPrint"Previous version: $g_strAddVerMaj.$g_strAddVerMin.$g_strAddVerBuild (Rev $g_strAddVerRev)"599 ${LogVerbose} "Previous version: $g_strAddVerMaj.$g_strAddVerMin.$g_strAddVerBuild (Rev $g_strAddVerRev)" 599 600 ${Else} 600 DetailPrint"No previous version of ${PRODUCT_NAME} detected."601 ${LogVerbose} "No previous version of ${PRODUCT_NAME} detected." 601 602 ${EndIf} 602 603 !if $%BUILD_TARGET_ARCH% == "amd64" 603 DetailPrint"Detected OS: Windows $g_strWinVersion (64-bit)"604 ${LogVerbose} "Detected OS: Windows $g_strWinVersion (64-bit)" 604 605 !else 605 DetailPrint"Detected OS: Windows $g_strWinVersion (32-bit)"606 !endif 607 DetailPrint"System Directory: $g_strSystemDir"606 ${LogVerbose} "Detected OS: Windows $g_strWinVersion (32-bit)" 607 !endif 608 ${LogVerbose} "System Directory: $g_strSystemDir" 608 609 609 610 !ifdef _DEBUG 610 DetailPrint "Debug!"611 ${LogVerbose} "Installer runs in debug mode" 611 612 !endif 612 613 … … 691 692 exit: 692 693 693 Call WriteLogUI694 695 694 SectionEnd 696 695 … … 703 702 Pop $R0 ; Windows Version 704 703 705 DetailPrint"Installing auto-logon support ..."704 ${LogVerbose} "Installing auto-logon support ..." 706 705 707 706 ; Another GINA already is installed? Check if this is ours, otherwise let the user decide (unless it's a silent setup) … … 710 709 ${If} $0 != "" 711 710 ${If} $0 != "VBoxGINA.dll" 712 DetailPrint"Found another already installed GINA module: $0"711 ${LogVerbose} "Found another already installed GINA module: $0" 713 712 MessageBox MB_ICONQUESTION|MB_YESNO|MB_DEFBUTTON1 $(VBOX_COMPONENT_AUTOLOGON_WARN_3RDPARTY) /SD IDYES IDYES install 714 DetailPrint"Skipping GINA installation, keeping: $0"713 ${LogVerbose} "Skipping GINA installation, keeping: $0" 715 714 goto skip 716 715 ${EndIf} … … 724 723 ${OrIf} $R0 == '8' ; Windows 8. 725 724 ; Use VBoxCredProv on Vista and up. 726 DetailPrint"Installing VirtualBox credential provider ..."725 ${LogVerbose} "Installing VirtualBox credential provider ..." 727 726 !insertmacro ReplaceDLL "$%PATH_OUT%\bin\additions\VBoxCredProv.dll" "$g_strSystemDir\VBoxCredProv.dll" "$INSTDIR" 728 727 WriteRegStr HKLM "SOFTWARE\Microsoft\Windows\CurrentVersion\Authentication\Credential Providers\{275D3BCC-22BB-4948-A7F6-3A3054EBA92B}" "" "VBoxCredProv" ; adding to (default) key … … 731 730 WriteRegStr HKCR "CLSID\{275D3BCC-22BB-4948-A7F6-3A3054EBA92B}\InprocServer32" "ThreadingModel" "Apartment" 732 731 ${Else} ; Use VBoxGINA on older Windows OSes (< Vista) 733 DetailPrint"Installing VirtualBox GINA ..."732 ${LogVerbose} "Installing VirtualBox GINA ..." 734 733 !insertmacro ReplaceDLL "$%PATH_OUT%\bin\additions\VBoxGINA.dll" "$g_strSystemDir\VBoxGINA.dll" "$INSTDIR" 735 734 WriteRegStr HKLM "SOFTWARE\Microsoft\Windows NT\CurrentVersion\WinLogon" "GinaDLL" "VBoxGINA.dll" … … 755 754 756 755 ${IfNot} ${FileExists} "$0" 757 LogText"WRP: File $0 does not exist, skipping"756 ${LogVerbose} "WRP: File $0 does not exist, skipping" 758 757 Return 759 758 ${EndIf} … … 762 761 nsExec::ExecToLog '"$g_strSystemDir\takeown.exe" /F "$0"' 763 762 Pop $1 ; Ret value 764 LogText"WRP: Taking ownership for $0 returned: $1"763 ${LogVerbose} "WRP: Taking ownership for $0 returned: $1" 765 764 ${Else} 766 LogText"WRP: Warning: takeown.exe not found, skipping"765 ${LogVerbose} "WRP: Warning: takeown.exe not found, skipping" 767 766 ${EndIf} 768 767 769 768 AccessControl::SetFileOwner "$0" "(S-1-5-32-545)" 770 769 Pop $1 771 DetailPrint"WRP: Setting file owner for $0 returned: $1"770 ${LogVerbose} "WRP: Setting file owner for $0 returned: $1" 772 771 773 772 AccessControl::GrantOnFile "$0" "(S-1-5-32-545)" "FullAccess" 774 773 Pop $1 775 DetailPrint"WRP: Setting access rights for $0 returned: $1"774 ${LogVerbose} "WRP: Setting access rights for $0 returned: $1" 776 775 777 776 !if $%VBOX_WITH_GUEST_INSTALL_HELPER% == "1" … … 779 778 VBoxGuestInstallHelper::DisableWFP "$0" 780 779 Pop $1 ; Get return value (ignored for now) 781 DetailPrint"WRP: Setting WFP exception for $0 returned: $1"780 ${LogVerbose} "WRP: Setting WFP exception for $0 returned: $1" 782 781 !endif 783 782 !endif … … 802 801 803 802 SetOutPath $g_strSystemDir 804 DetailPrint"Installing Direct3D support ..."803 ${LogVerbose} "Installing Direct3D support ..." 805 804 FILE "$%PATH_OUT%\bin\additions\VBoxD3D8.dll" 806 805 FILE "$%PATH_OUT%\bin\additions\VBoxD3D9.dll" … … 826 825 ${InstallFileEx} "" "$%PATH_OUT%\bin\additions\d3d9.dll" "$g_strSystemDir\dllcache\d3d9.dll" "$TEMP" 827 826 ${Else} 828 DetailPrint"DLL cache does not exist, skipping"827 ${LogVerbose} "DLL cache does not exist, skipping" 829 828 ${EndIf} 830 829 ${EndIf} … … 851 850 ; Also copy 32-bit DLLs on 64-bit Windows in SysWOW64 node 852 851 SetOutPath $g_strSysWow64 853 DetailPrint"Installing Direct3D support for 32-bit applications (SysWOW64: $g_strSysWow64) ..."852 ${LogVerbose} "Installing Direct3D support for 32-bit applications (SysWOW64: $g_strSysWow64) ..." 854 853 FILE "$%VBOX_PATH_ADDITIONS_WIN_X86%\VBoxD3D8.dll" 855 854 FILE "$%VBOX_PATH_ADDITIONS_WIN_X86%\VBoxD3D9.dll" … … 875 874 ${InstallFileEx} "" "$%VBOX_PATH_ADDITIONS_WIN_X86%\d3d9.dll" "$g_strSysWow64\dllcache\d3d9.dll" "$TEMP" 876 875 ${Else} 877 DetailPrint"DLL cache does not exist, skipping"876 ${LogVerbose} "DLL cache does not exist, skipping" 878 877 ${EndIf} 879 878 ${EndIf} … … 944 943 945 944 !ifdef _DEBUG 946 DetailPrint"Doing post install ..."945 ${LogVerbose} "Doing post install ..." 947 946 !endif 948 947 … … 974 973 !endif 975 974 976 DetailPrint"Installation completed."975 ${LogVerbose} "Installation completed." 977 976 978 977 SectionEnd … … 1058 1057 MessageBox MB_ICONSTOP $(VBOX_ERROR_INST_FAILED) /SD IDOK 1059 1058 1060 Push "Error while installing ${PRODUCT_NAME}!" 1061 Push 2 ; Message type = error 1062 Call WriteLogVBoxTray 1063 1064 StrCpy $g_bLogEnable "true" 1065 Call WriteLogUI 1059 ${If} $g_bPostInstallStatus == "true" 1060 ${LogToVBoxTray} "2" "Error while installing ${PRODUCT_NAME}!" 1061 ${EndIf} 1062 1063 ; Set overall exit code 1066 1064 SetErrorLevel 1 1067 1065 … … 1071 1069 Function .onInstSuccess 1072 1070 1073 Push "${PRODUCT_NAME} successfully updated!"1074 Push 0 ; Message type = info1075 Call WriteLogVBoxTray1071 ${If} $g_bPostInstallStatus == "true" 1072 ${LogToVBoxTray} "0" "${PRODUCT_NAME} successfully updated!" 1073 ${EndIf} 1076 1074 1077 1075 FunctionEnd … … 1144 1142 ${EndIf} 1145 1143 1144 IfSilent 0 +3 1145 ${LogEnable} "true" ; Force logging in silent mode 1146 ${LogVerbose} "Installer runs in silent mode" 1147 1146 1148 ; Retrieve Windows version and store result in $g_strWinVersion 1147 1149 Call GetWindowsVer … … 1153 1155 AccessControl::GetCurrentUserName 1154 1156 Pop $g_strCurUser 1155 DetailPrint "Current user: $g_strCurUser"1157 ${LogVerbose} "Current user is: $g_strCurUser" 1156 1158 1157 1159 ; Only extract files? This action can be called even from non-Admin users … … 1282 1284 1283 1285 !ifdef _DEBUG 1284 ; Enable logging 1285 Call un.EnableLog 1286 ${LogEnable} "true" 1286 1287 !endif 1287 1288 … … 1304 1305 restart: 1305 1306 1306 DetailPrint"Rebooting ..."1307 ${LogVerbose} "Rebooting ..." 1307 1308 Reboot 1308 1309
Note:
See TracChangeset
for help on using the changeset viewer.