Changeset 41024 in vbox for trunk/src/VBox/Installer/win
- Timestamp:
- Apr 23, 2012 12:51:21 PM (13 years ago)
- svn:sync-xref-src-repo-rev:
- 77585
- Location:
- trunk/src/VBox/Installer/win
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Installer/win/InstallHelper/VBoxInstallHelper.cpp
r40997 r41024 943 943 if (FAILED(hr)) 944 944 { 945 logStringW(hModule, L"RemoveHostOnlyInterfaces: NetAdp uninstalled successfully, but failed to remove infs \n");945 logStringW(hModule, L"RemoveHostOnlyInterfaces: NetAdp uninstalled successfully, but failed to remove infs"); 946 946 } 947 947 } 948 948 else 949 logStringW(hModule, L"RemoveHostOnlyInterfaces: NetAdp uninstall failed, hr = 0x%x \n", hr);949 logStringW(hModule, L"RemoveHostOnlyInterfaces: NetAdp uninstall failed, hr = 0x%x", hr); 950 950 951 951 /* Restore original setup mode. */ … … 965 965 netCfgLoggerEnable(hModule); 966 966 967 logStringW(hModule, L"StopHostOnlyInterfaces: Stopping all host-only Interfaces");967 logStringW(hModule, L"StopHostOnlyInterfaces: Stopping all host-only interfaces"); 968 968 969 969 BOOL bSetupModeInteractive = SetupSetNonInteractiveMode(FALSE); … … 974 974 hr = VBoxDrvCfgInfUninstallAllSetupDi(&GUID_DEVCLASS_NET, NETADP_ID, L"Net", 0/* could be SUOI_FORCEDELETE */); 975 975 if (FAILED(hr)) 976 { 977 logStringW(hModule, L"RemoveHostOnlyInterfaces: VBoxDrvCfgInfUninstallAllSetupDi failed hr = 0x%x\n", hr); 978 } 976 logStringW(hModule, L"StopHostOnlyInterfaces: VBoxDrvCfgInfUninstallAllSetupDi failed, hr = 0x%x", hr); 979 977 } 980 978 else 981 logStringW(hModule, L" RemoveHostOnlyInterfaces: NetAdp uninstall failed, hr = 0x%x\n", hr);979 logStringW(hModule, L"StopHostOnlyInterfaces: Disabling host interfaces failed, hr = 0x%x", hr); 982 980 983 981 /* Restore original setup mode. */ … … 997 995 netCfgLoggerEnable(hModule); 998 996 999 logStringW(hModule, L"UpdateHostOnlyInterfaces: Updating all host-only Interfaces");997 logStringW(hModule, L"UpdateHostOnlyInterfaces: Updating all host-only interfaces"); 1000 998 1001 999 BOOL bSetupModeInteractive = SetupSetNonInteractiveMode(FALSE); … … 1023 1021 logStringW(hModule, L"UpdateHostOnlyInterfaces: Resulting INF path = %s", pwszInfPath); 1024 1022 1025 BOOL fRebootRequired = FALSE; 1026 HRESULT hr = VBoxNetCfgWinUpdateHostOnlyNetworkInterface(pwszInfPath, &fRebootRequired); 1027 if (SUCCEEDED(hr)) 1028 { 1029 if (fRebootRequired) 1023 DWORD attrFile = GetFileAttributesW(pwszInfPath); 1024 if (attrFile == INVALID_FILE_ATTRIBUTES) 1025 { 1026 DWORD dwErr = GetLastError(); 1027 logStringW(hModule, L"UpdateHostOnlyInterfaces: File \"%s\" not found, dwErr=%ld", 1028 pwszInfPath, dwErr); 1029 } 1030 else 1031 { 1032 logStringW(hModule, L"UpdateHostOnlyInterfaces: File \"%s\" exists", 1033 pwszInfPath); 1034 1035 BOOL fRebootRequired = FALSE; 1036 HRESULT hr = VBoxNetCfgWinUpdateHostOnlyNetworkInterface(pwszInfPath, &fRebootRequired); 1037 if (SUCCEEDED(hr)) 1030 1038 { 1031 logStringW(hModule, L"Reboot required, setting REBOOT property to Force"); 1032 HRESULT hr2 = MsiSetPropertyW(hModule, L"REBOOT", L"Force"); 1033 if (hr2 != ERROR_SUCCESS) 1034 logStringW(hModule, L"Failed to set REBOOT property, error = 0x%x", hr2); 1039 if (fRebootRequired) 1040 { 1041 logStringW(hModule, L"UpdateHostOnlyInterfaces: Reboot required, setting REBOOT property to force"); 1042 HRESULT hr2 = MsiSetPropertyW(hModule, L"REBOOT", L"Force"); 1043 if (hr2 != ERROR_SUCCESS) 1044 logStringW(hModule, L"UpdateHostOnlyInterfaces: Failed to set REBOOT property, error = 0x%x", hr2); 1045 } 1035 1046 } 1036 }1037 else1038 logStringW(hModule, L"UpdateHostOnlyInterfaces: VBoxNetCfgWinUpdateHostOnlyNetworkInterface failed, hr = 0x%x", hr);1047 else 1048 logStringW(hModule, L"UpdateHostOnlyInterfaces: VBoxNetCfgWinUpdateHostOnlyNetworkInterface failed, hr = 0x%x", hr); 1049 } 1039 1050 } 1040 1051 else -
trunk/src/VBox/Installer/win/VirtualBox.wxs
r39003 r41024 59 59 <!-- Note: GUIDs in WiX *must* be uppercase! --> 60 60 <!-- Always include an upgrade ID or otherwise upgrade installation will not be possible. When doing 61 a major upgrade (more than just fixing a few files) change the product GUID. --> 61 a major upgrade (more than just fixing a few files) change the product GUID. We always do a major 62 upgrade even for minor VBox updates. For that only change the product ID and the product version. 63 The upgrade code *never* must be changed! --> 62 64 63 65 <!-- Update / Upgrade policies: … … 78 80 Manufacturer="$(env.VBOX_VENDOR)"> 79 81 80 <!-- Package GUIDs must be different for each package. The "???" directs WiX to create one. -->81 82 <Package Id="*" Keywords="Installer" 82 83 Description="$(env.VBOX_PRODUCT) $(var.Property_VersionExt) installation package" … … 686 687 Description="!(loc.VB_App)" 687 688 ConfigurableDirectory="INSTALLDIR" TypicalDefault="install" Display="expand" 688 Absent="disallow" >689 Absent="disallow" AllowAdvertise="no" > 689 690 690 691 <ComponentRef Id="cp_StartMenuVBox" /> … … 717 718 <Feature Id="VBoxUSB" Title="VirtualBox USB Support" Level="1" 718 719 Description="!(loc.VB_USBDriver)" 719 ConfigurableDirectory="INSTALLDIR" TypicalDefault="install" Display="expand" > 720 ConfigurableDirectory="INSTALLDIR" TypicalDefault="install" Display="expand" 721 Absent="allow" AllowAdvertise="no" > 720 722 <ComponentRef Id="cp_USBFilterDriver" /> 721 723 <ComponentRef Id="cp_USBDeviceDriver" /> … … 725 727 <Feature Id="VBoxNetwork" Title="VirtualBox Networking" Level="1" 726 728 Description="!(loc.VB_Network)" 727 ConfigurableDirectory="INSTALLDIR" TypicalDefault="install" Display="expand" > 728 <Feature Id="VBoxNetworkFlt" Title="VirtualBox Bridged Networking" Level="1" 729 Description="!(loc.VB_NetFltDriver)" 730 ConfigurableDirectory="INSTALLDIR" TypicalDefault="install" Display="expand" > 731 <ComponentRef Id="cp_NetFltDriver" /> 732 </Feature> 733 <Feature Id="VBoxNetworkAdp" Title="VirtualBox Host-Only Networking" Level="1" 734 Description="!(loc.VB_NetAdpDriver)" 735 ConfigurableDirectory="INSTALLDIR" TypicalDefault="install" Display="expand" > 736 <ComponentRef Id="cp_NetAdpDriver" /> 737 </Feature> 729 ConfigurableDirectory="INSTALLDIR" TypicalDefault="install" Display="expand" 730 Absent="allow" AllowAdvertise="no" > 731 <Feature Id="VBoxNetworkFlt" Title="VirtualBox Bridged Networking" Level="1" 732 Description="!(loc.VB_NetFltDriver)" 733 ConfigurableDirectory="INSTALLDIR" TypicalDefault="install" Display="expand" 734 Absent="allow" AllowAdvertise="no" > 735 <ComponentRef Id="cp_NetFltDriver" /> 736 </Feature> 737 <Feature Id="VBoxNetworkAdp" Title="VirtualBox Host-Only Networking" Level="1" 738 Description="!(loc.VB_NetAdpDriver)" 739 ConfigurableDirectory="INSTALLDIR" TypicalDefault="install" Display="expand" 740 Absent="allow" AllowAdvertise="no" > 741 <ComponentRef Id="cp_NetAdpDriver" /> 742 </Feature> 738 743 </Feature> 739 744 <?endif?> … … 742 747 <Feature Id="VBoxPython" Title="VirtualBox Python 2.x Support" Level="1" 743 748 Description="!(loc.VB_Python)" 744 ConfigurableDirectory="INSTALLDIR" TypicalDefault="install" Display="expand" > 749 ConfigurableDirectory="INSTALLDIR" TypicalDefault="install" Display="expand" 750 Absent="allow" AllowAdvertise="no" > 745 751 <ComponentRef Id="cp_VBoxPythonBinding" /> 746 752 </Feature> … … 753 759 754 760 <InstallExecuteSequence> 761 762 <!-- 763 To debug the action sequences, do: "msiexec /i <VBox.msi> /lar <Logfile>" 764 765 InstallUISequence (client side) is: 766 AppSearch 767 LaunchConditions 768 ValidateProductID 769 CostInitialize 770 FileCost 771 CostFinalize 772 ExecuteAction -> will pass control over to "InstallExecuteSequence" 773 774 The first six actions above will be repeated but skipped on the server 775 side if already run on the client side. 776 777 InstallExecuteSequence (server side) is: 778 <First six action from InstallUISequence> 779 . 780 InstallInitialize 781 . 782 InstallFinalize 783 784 The actions between InstallInitialize and InstallFinalize will be gone through twice: 785 - The first time the installer creates an installation script containing all actions in the right 786 sequence which need to get executed in a batch later. At this point the launch conditions for 787 custom actions must be met already! 788 - The second time the generated installation script will be run as-is. 789 790 Also, the InstallUISequence and InstallExecuteSequence tables run in different sessions which 791 need public properties (that is, UPPERCASE properties). 792 --> 755 793 756 794 <!-- AppSearch must be done before "RemoveExistingProducts" and before "FindRelatedProducts". --> 757 795 <AppSearch Sequence="1"></AppSearch> 758 796 <LaunchConditions After="AppSearch" /> 759 <RemoveExistingProducts After="InstallValidate"><![CDATA[NEWERVERSIONDETECTED OR PREVIOUSVERSIONSINSTALLED]]></RemoveExistingProducts> 797 798 <!-- First install the new version and then remove the old version. This is more efficient. --> 799 <InstallExecute Before="RemoveExistingProducts" /> 800 <RemoveExistingProducts Before="InstallFinalize" /> 760 801 761 802 <Custom Action="ca_OriginalTargetDir" After="FileCost"><![CDATA[(NOT INSTALLDIR) AND (NOT EXISTINGINSTALLDIR)]]></Custom> … … 765 806 <?if $(env.VBOX_WITH_NETFLT) = "yes" ?> 766 807 <!-- Create host-only interfaces on first-time install. --> 767 <Custom Action="ca_CreateHostOnlyInterfaceArgs" Before="ca_CreateHostOnlyInterface" ><![CDATA[&VBoxNetworkAdp=3 AND (NOT UPGRADINGPRODUCTCODE)]]></Custom>768 <Custom Action="ca_CreateHostOnlyInterface" Before="InstallFinalize" ><![CDATA[&VBoxNetworkAdp=3 AND (NOT UPGRADINGPRODUCTCODE)]]></Custom>808 <Custom Action="ca_CreateHostOnlyInterfaceArgs" Before="ca_CreateHostOnlyInterface" ><![CDATA[&VBoxNetworkAdp=3 AND (NOT PREVIOUSVERSIONSINSTALLED)]]></Custom> 809 <Custom Action="ca_CreateHostOnlyInterface" Before="InstallFinalize" ><![CDATA[&VBoxNetworkAdp=3 AND (NOT PREVIOUSVERSIONSINSTALLED)]]></Custom> 769 810 <!-- Don't remove the host-only interfaces on update, only on uninstall. --> 770 811 <Custom Action="ca_RemoveHostOnlyInterfaces" After="ca_UninstallNetFlt" ><![CDATA[(NOT UPGRADINGPRODUCTCODE) AND (REMOVE="ALL")]]></Custom> 771 812 <!-- First stop the existing host-only interfaces on updat ... --> 772 <Custom Action="ca_StopHostOnlyInterfaces" Before="ca_UpdateHostOnlyInterfaces" ><![CDATA[ &VBoxNetworkAdp=3 AND (UPGRADINGPRODUCTCODE)]]></Custom>813 <Custom Action="ca_StopHostOnlyInterfaces" Before="ca_UpdateHostOnlyInterfaces" ><![CDATA[UPGRADINGPRODUCTCODE]]></Custom> 773 814 <!-- ... then do the actual driver update. --> 774 <Custom Action="ca_UpdateHostOnlyInterfacesArgs" Before="ca_UpdateHostOnlyInterfaces" ><![CDATA[ &VBoxNetworkAdp=3 AND (UPGRADINGPRODUCTCODE)]]></Custom>775 <Custom Action="ca_UpdateHostOnlyInterfaces" Before="InstallFi nalize" ><![CDATA[&VBoxNetworkAdp=3 AND (UPGRADINGPRODUCTCODE)]]></Custom>815 <Custom Action="ca_UpdateHostOnlyInterfacesArgs" Before="ca_UpdateHostOnlyInterfaces" ><![CDATA[Installed AND UPGRADINGPRODUCTCODE]]></Custom> 816 <Custom Action="ca_UpdateHostOnlyInterfaces" Before="InstallFiles" ><![CDATA[Installed AND UPGRADINGPRODUCTCODE]]></Custom> 776 817 777 818 <Custom Action="ca_RollbackInstallNetFltArgs" Before="ca_RollbackInstallNetFlt" ><![CDATA[&VBoxNetworkFlt=3]]></Custom>
Note:
See TracChangeset
for help on using the changeset viewer.