Changeset 39003 in vbox
- Timestamp:
- Oct 17, 2011 1:16:04 PM (13 years ago)
- Location:
- trunk/src/VBox/Installer/win
- Files:
-
- 3 edited
-
InstallHelper/VBoxInstallHelper.cpp (modified) (9 diffs)
-
InstallHelper/VBoxInstallHelper.def (modified) (1 diff)
-
VirtualBox.wxs (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Installer/win/InstallHelper/VBoxInstallHelper.cpp
r38794 r39003 736 736 { 737 737 738 logStringW(hModule, L"Install ing NetFlt");738 logStringW(hModule, L"InstallNetFlt: Installing NetFlt"); 739 739 740 740 uErr = doNetCfgInit(hModule, &pNetCfg, TRUE); … … 758 758 VBoxNetCfgWinReleaseINetCfg(pNetCfg, TRUE); 759 759 760 logStringW(hModule, L"Install ing NetFlt done");760 logStringW(hModule, L"InstallNetFlt: Done"); 761 761 } 762 762 else … … 844 844 bool bSetStaticIp = true; 845 845 846 logStringW(hModule, L"Creat ing host-only interface");846 logStringW(hModule, L"CreateHostOnlyInterface: Creating host-only interface"); 847 847 848 848 HRESULT hr = VBoxNetCfgWinRemoveAllNetDevicesOfId(NETADP_ID); … … 885 885 if (pwszInfPath != NULL && bIsFile) 886 886 { 887 logStringW(hModule, L"CreateHostOnlyInterface: Calling VBoxDrvCfgInfInstall(%s)", pwszInfPath);887 logStringW(hModule, L"CreateHostOnlyInterface: Calling VBoxDrvCfgInfInstall(%s)", pwszInfPath); 888 888 hr = VBoxDrvCfgInfInstall(pwszInfPath); 889 logStringW(hModule, L"CreateHostOnlyInterface: VBoxDrvCfgInfInstall returns 0x%x", hr);889 logStringW(hModule, L"CreateHostOnlyInterface: VBoxDrvCfgInfInstall returns 0x%x", hr); 890 890 if (FAILED(hr)) 891 891 logStringW(hModule, L"CreateHostOnlyInterface: Failed to install INF file, error = 0x%x", hr); … … 894 894 if (SUCCEEDED(hr)) 895 895 { 896 logStringW(hModule, L"CreateHostOnlyInterface: calling VBoxNetCfgWinCreateHostOnlyNetworkInterface");896 logStringW(hModule, L"CreateHostOnlyInterface: calling VBoxNetCfgWinCreateHostOnlyNetworkInterface"); 897 897 hr = VBoxNetCfgWinCreateHostOnlyNetworkInterface(pwszInfPath, bIsFile, &guid, NULL, NULL); 898 logStringW(hModule, L"CreateHostOnlyInterface: VBoxNetCfgWinCreateHostOnlyNetworkInterface returns 0x%x", hr);898 logStringW(hModule, L"CreateHostOnlyInterface: VBoxNetCfgWinCreateHostOnlyNetworkInterface returns 0x%x", hr); 899 899 if (SUCCEEDED(hr)) 900 900 { 901 901 ULONG ip = inet_addr("192.168.56.1"); 902 902 ULONG mask = inet_addr("255.255.255.0"); 903 logStringW(hModule, L"CreateHostOnlyInterface: calling VBoxNetCfgWinEnableStaticIpConfig");903 logStringW(hModule, L"CreateHostOnlyInterface: calling VBoxNetCfgWinEnableStaticIpConfig"); 904 904 hr = VBoxNetCfgWinEnableStaticIpConfig(&guid, ip, mask); 905 logStringW(hModule, L"CreateHostOnlyInterface: VBoxNetCfgWinEnableStaticIpConfig returns 0x%x", hr);905 logStringW(hModule, L"CreateHostOnlyInterface: VBoxNetCfgWinEnableStaticIpConfig returns 0x%x", hr); 906 906 if (FAILED(hr)) 907 907 logStringW(hModule, L"CreateHostOnlyInterface: VBoxNetCfgWinEnableStaticIpConfig failed, error = 0x%x", hr); … … 912 912 913 913 if (SUCCEEDED(hr)) 914 logStringW(hModule, L"Creat ing host-only interface done");914 logStringW(hModule, L"CreateHostOnlyInterface: Creating host-only interface done"); 915 915 916 916 /* Restore original setup mode. */ 917 logStringW(hModule, L"CreateHostOnlyInterface: almost done...");917 logStringW(hModule, L"CreateHostOnlyInterface: Almost done..."); 918 918 if (bSetupModeInteractive) 919 919 SetupSetNonInteractiveMode(bSetupModeInteractive); … … 923 923 #endif /* VBOX_WITH_NETFLT */ 924 924 925 logStringW(hModule, L"CreateHostOnlyInterface: returns success (ignoring all failures)");925 logStringW(hModule, L"CreateHostOnlyInterface: Returns success (ignoring all failures)"); 926 926 /* Never fail the install even if we did not succeed. */ 927 927 return ERROR_SUCCESS; … … 933 933 netCfgLoggerEnable(hModule); 934 934 935 logStringW(hModule, L"RemoveHostOnlyInterfaces: Removing All Host-Only Interface");935 logStringW(hModule, L"RemoveHostOnlyInterfaces: Removing all host-only interfaces"); 936 936 937 937 BOOL bSetupModeInteractive = SetupSetNonInteractiveMode(FALSE); … … 952 952 if (bSetupModeInteractive) 953 953 SetupSetNonInteractiveMode(bSetupModeInteractive); 954 955 netCfgLoggerDisable(); 956 #endif /* VBOX_WITH_NETFLT */ 957 958 /* Never fail the install even if we did not succeed. */ 959 return ERROR_SUCCESS; 960 } 961 962 UINT __stdcall StopHostOnlyInterfaces(MSIHANDLE hModule) 963 { 964 #ifdef VBOX_WITH_NETFLT 965 netCfgLoggerEnable(hModule); 966 967 logStringW(hModule, L"StopHostOnlyInterfaces: Stopping all host-only Interfaces"); 968 969 /** TODO */ 970 971 netCfgLoggerDisable(); 972 #endif /* VBOX_WITH_NETFLT */ 973 974 /* Never fail the install even if we did not succeed. */ 975 return ERROR_SUCCESS; 976 } 977 978 UINT __stdcall UpdateHostOnlyInterfaces(MSIHANDLE hModule) 979 { 980 #ifdef VBOX_WITH_NETFLT 981 netCfgLoggerEnable(hModule); 982 983 logStringW(hModule, L"UpdateHostOnlyInterfaces: Updating all host-only Interfaces"); 984 985 WCHAR wszMpInf[MAX_PATH]; 986 DWORD cchMpInf = RT_ELEMENTS(wszMpInf) - sizeof("drivers\\network\\netadp\\VBoxNetAdp.inf") - 1; 987 LPCWSTR pwszInfPath = NULL; 988 bool bIsFile = false; 989 UINT uErr = MsiGetPropertyW(hModule, L"CustomActionData", wszMpInf, &cchMpInf); 990 if (uErr == ERROR_SUCCESS) 991 { 992 if (cchMpInf) 993 { 994 logStringW(hModule, L"UpdateHostOnlyInterfaces: NetAdpDir property = %s", wszMpInf); 995 if (wszMpInf[cchMpInf - 1] != L'\\') 996 { 997 wszMpInf[cchMpInf++] = L'\\'; 998 wszMpInf[cchMpInf] = L'\0'; 999 } 1000 1001 wcscat(wszMpInf, L"drivers\\network\\netadp\\VBoxNetAdp.inf"); 1002 pwszInfPath = wszMpInf; 1003 bIsFile = true; 1004 1005 logStringW(hModule, L"UpdateHostOnlyInterfaces: Resulting INF path = %s", pwszInfPath); 1006 } 1007 else 1008 logStringW(hModule, L"UpdateHostOnlyInterfaces: NetAdpDir property value is empty"); 1009 } 1010 else 1011 logStringW(hModule, L"UpdateHostOnlyInterfaces: Failed to get NetAdpDir property, error = 0x%x", uErr); 1012 1013 /** TODO */ 954 1014 955 1015 netCfgLoggerDisable(); -
trunk/src/VBox/Installer/win/InstallHelper/VBoxInstallHelper.def
r32112 r39003 27 27 UninstallTAPInstances 28 28 CreateHostOnlyInterface 29 StopHostOnlyInterfaces 30 UpdateHostOnlyInterfaces 29 31 RemoveHostOnlyInterfaces 30 32 -
trunk/src/VBox/Installer/win/VirtualBox.wxs
r38938 r39003 179 179 180 180 <?if $(env.VBOX_WITH_NETFLT) = "yes" ?> 181 <CustomAction Id="ca_CreateHostOnlyInterface" BinaryKey="VBoxInstallHelper" DllEntry="CreateHostOnlyInterface" Execute="deferred" Return="check" Impersonate="no"/>181 <CustomAction Id="ca_CreateHostOnlyInterface" BinaryKey="VBoxInstallHelper" DllEntry="CreateHostOnlyInterface" Execute="deferred" Return="check" Impersonate="no"/> 182 182 <CustomAction Id="ca_CreateHostOnlyInterfaceArgs" Property="ca_CreateHostOnlyInterface" Value="[INSTALLDIR]" Execute="immediate"/> 183 183 184 184 <CustomAction Id="ca_RemoveHostOnlyInterfaces" BinaryKey="VBoxInstallHelper" DllEntry="RemoveHostOnlyInterfaces" Execute="deferred" Return="check" Impersonate="no"/> 185 <CustomAction Id="ca_StopHostOnlyInterfaces" BinaryKey="VBoxInstallHelper" DllEntry="StopHostOnlyInterfaces" Execute="deferred" Return="check" Impersonate="no"/> 186 187 <CustomAction Id="ca_UpdateHostOnlyInterfaces" BinaryKey="VBoxInstallHelper" DllEntry="UpdateHostOnlyInterfaces" Execute="deferred" Return="check" Impersonate="no"/> 188 <CustomAction Id="ca_UpdateHostOnlyInterfacesArgs" Property="ca_UpdateHostOnlyInterfaces" Value="[INSTALLDIR]" Execute="immediate"/> 185 189 186 190 <CustomAction Id="ca_InstallNetFlt" BinaryKey="VBoxInstallHelper" DllEntry="InstallNetFlt" Execute="deferred" Return="check" Impersonate="no"/> … … 760 764 <Custom Action="ca_UninstallTAPInstances" Before="InstallFiles" >1</Custom> 761 765 <?if $(env.VBOX_WITH_NETFLT) = "yes" ?> 762 <Custom Action="ca_CreateHostOnlyInterfaceArgs" Before="ca_CreateHostOnlyInterface" ><![CDATA[&VBoxNetworkAdp=3]]></Custom> 763 <Custom Action="ca_CreateHostOnlyInterface" Before="InstallFinalize" ><![CDATA[&VBoxNetworkAdp=3]]></Custom> 764 <Custom Action="ca_RemoveHostOnlyInterfaces" After="ca_UninstallNetFlt" ><![CDATA[REMOVE]]></Custom> 766 <!-- 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> 769 <!-- Don't remove the host-only interfaces on update, only on uninstall. --> 770 <Custom Action="ca_RemoveHostOnlyInterfaces" After="ca_UninstallNetFlt" ><![CDATA[(NOT UPGRADINGPRODUCTCODE) AND (REMOVE="ALL")]]></Custom> 771 <!-- First stop the existing host-only interfaces on updat ... --> 772 <Custom Action="ca_StopHostOnlyInterfaces" Before="ca_UpdateHostOnlyInterfaces" ><![CDATA[&VBoxNetworkAdp=3 AND (UPGRADINGPRODUCTCODE)]]></Custom> 773 <!-- ... 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="InstallFinalize" ><![CDATA[&VBoxNetworkAdp=3 AND (UPGRADINGPRODUCTCODE)]]></Custom> 765 776 766 777 <Custom Action="ca_RollbackInstallNetFltArgs" Before="ca_RollbackInstallNetFlt" ><![CDATA[&VBoxNetworkFlt=3]]></Custom> … … 780 791 <Custom Action="ca_InstallBranding" Before="InstallFinalize" ><![CDATA[NOT REMOVE]]></Custom> 781 792 782 <Custom Action="ca_UninstallBrandingArgs" Before="ca_UninstallBranding" ><![CDATA[REMOVE]]></Custom> 783 <Custom Action="ca_UninstallBranding" Before="InstallFinalize" ><![CDATA[REMOVE]]></Custom> 793 <!-- Uninstall branding on complete uninstall, not on update. --> 794 <Custom Action="ca_UninstallBrandingArgs" Before="ca_UninstallBranding" ><![CDATA[(NOT UPGRADINGPRODUCTCODE) AND (REMOVE="ALL")]]></Custom> 795 <Custom Action="ca_UninstallBranding" Before="InstallFinalize" ><![CDATA[(NOT UPGRADINGPRODUCTCODE) AND (REMOVE="ALL")]]></Custom> 784 796 785 797 </InstallExecuteSequence>
Note:
See TracChangeset
for help on using the changeset viewer.

