VirtualBox

Changeset 70228 in vbox for trunk/src/VBox


Ignore:
Timestamp:
Dec 19, 2017 7:28:15 PM (7 years ago)
Author:
vboxsync
Message:

VBoxSDS: ​​​bugref:3300: fixed VirtualBox installation when UAC is enabled

Location:
trunk/src/VBox
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Installer/win/VBoxMergeApp.wxi

    r69407 r70228  
    8282        <?include $(env.PATH_TARGET)\VirtualBox_TypeLib.wxi ?>
    8383<?endif?>
     84    </Component>
    8485
    8586<?if $(env.VBOX_WITH_SDS) = "yes" ?>
    86         <File Id="VBoxSDS" Name="VBoxSDS.exe"
    87               Source="$(env.PATH_OUT)\bin\VBoxSDS.exe">
    88         </File>
    89 <?endif?>
    90     </Component>
     87    <Component Id="cp_VBoxSDS" Guid="{3DC151E0-CA53-4213-8711-D983FDA28132}" >
     88        <File Id="VBoxSDS" Name="VBoxSDS.exe" Vital="yes" KeyPath="yes"
     89                    Source="$(env.PATH_OUT)\bin\VBoxSDS.exe">
     90        </File>
     91        <!--
     92            The Name of windows service is referenced in different places.
     93            Don't forget to change it in other places too If you change it here :
     94                VirtualBox.idl (module name),
     95                VBoxSDS.cpp and VBoxProxyStub.cpp
     96            -->
     97        <ServiceInstall Id="VBoxSDSInstall"
     98                    Account="LocalSystem"
     99                    Type="ownProcess"
     100                    Name="VBoxSDS"
     101                    DisplayName="VirtualBox system service"
     102                    Description="Used as a COM server for VirtualBox API."
     103                    Start="demand"
     104                    Interactive="no"
     105                    ErrorControl="normal"
     106                    Vital="yes">
     107            <ServiceDependency Id="RPCSS" />
     108        </ServiceInstall>
     109        <ServiceControl Id="VBoxSDSControl" Name="VBoxSDS" Stop="both" Remove="uninstall" />
     110    </Component>
     111<?endif?>
    91112
    92113<?if $(env.VBOX_WITH_MIDL_PROXY_STUB) = "yes" ?>
  • trunk/src/VBox/Installer/win/VirtualBox.wxs

    r69407 r70228  
    234234    <CustomAction Id="ca_UninstallBrandingArgs" Property="ca_UninstallBranding" Value="[INSTALLDIR]" Execute="immediate"/>
    235235
    236 <?if $(env.VBOX_WITH_SDS) = "yes" ?>
    237     <CustomAction Id="ca_InstallVBoxSDS" Directory="INSTALLDIR" ExeCommand='"[INSTALLDIR]\VBoxSDS.exe" --regservice' Return="check" Impersonate="no" />
    238     <CustomAction Id="ca_UninstallVBoxSDS" Directory="INSTALLDIR" ExeCommand='"[INSTALLDIR]\VBoxSDS.exe" --unregservice' Return="check" Impersonate="no" />
    239 <?endif?>
    240 
    241236<?if $(env.VBOX_WITH_MSM_INSTALL) = "no" ?>
    242237    <?include VBoxMergeAppCA.wxi ?>
     
    460455        <!-- unattended template component -->
    461456        <ComponentRef Id="cp_UnattendedTemplates" />
     457<?endif ?>
     458
     459<?if $(env.VBOX_WITH_SDS) = "yes" ?>
     460        <ComponentRef Id="cp_VBoxSDS" />
    462461<?endif ?>
    463462
     
    578577        <Custom Action="ca_UninstallBranding" Before="InstallFinalize" ><![CDATA[(NOT UPGRADINGPRODUCTCODE) AND (REMOVE="ALL")]]></Custom>
    579578
    580 <?if $(env.VBOX_WITH_SDS) = "yes" ?>
    581         <Custom Action="ca_InstallVBoxSDS" After="InstallFinalize" ><![CDATA[NOT REMOVE]]></Custom>
    582         <Custom Action="ca_UninstallVBoxSDS" Before="InstallFinalize" ><![CDATA[(NOT UPGRADINGPRODUCTCODE) AND (REMOVE="ALL")]]></Custom>
    583 <?endif ?>
    584 
    585579<?if $(env.VBOX_WITH_MSM_INSTALL) = "no" ?>
    586580        <?include VBoxMergeAppSeq.wxi ?>
  • trunk/src/VBox/Installer/win/VirtualBox_TypeLib.xsl

    r69407 r70228  
    2828
    2929<xsl:param name="a_sTarget">all</xsl:param>
    30 <xsl:param name="a_sWithSDS">no</xsl:param>
     30<xsl:param name="a_sWithSDS" select="no"/>
    3131
    3232
     
    7979-->
    8080    <xsl:template match="application[@uuid='ec0e78e8-fa43-43e8-ac0a-02c784c4a4fa']">
    81         <xsl:if test="a_sWithSDS='yes'" >
     81        <xsl:if test="$a_sWithSDS='yes'" >
    8282            <xsl:call-template name="application_template" />
    8383        </xsl:if>
     
    9595                <xsl:value-of select="@name"/> Application
    9696            </xsl:attribute>
     97            <!--
     98                The name of windows service should be defined as module name in .xidl.
     99                It's viable for correct registration of COM windows service.
     100            -->
     101            <xsl:if test="module/@context = 'LocalService'">
     102                <xsl:attribute name="LocalService" >
     103                    <xsl:value-of select="module/@name"/>
     104                </xsl:attribute>
     105            </xsl:if>
    97106            <xsl:choose>
    98107                <xsl:when test="$a_sTarget = 'VBoxClient-x86'">
     
    118127      <xsl:choose>
    119128        <xsl:when test="../@context='InprocServer'">InprocServer32</xsl:when>
    120         <xsl:when test="../@context='LocalServer'">LocalServer32</xsl:when>
     129        <xsl:when test="../@context='LocalServer'" >LocalServer32</xsl:when>
     130        <xsl:when test="../@context='LocalService'">LocalServer32</xsl:when>
    121131        <xsl:otherwise>
    122132          <xsl:message terminate="yes">
  • trunk/src/VBox/Installer/win/VirtualBox_TypeLibWithInterfaces.xsl

    r69407 r70228  
    2727
    2828<xsl:param name="a_sTarget">all</xsl:param>
     29<xsl:param name ="a_sWithSDS" select="no"/>
    2930<xsl:param name="a_sProxyStubClsid">{0BB3B78C-1807-4249-5BA5-EA42D66AF0BF}</xsl:param>
    3031<xsl:variable name="g_sProxyStubClsid" select="translate($a_sProxyStubClsid,'abcdef','ABCDEF')"/>
     
    6768-->
    6869    <xsl:template match="application[@uuid='ec0e78e8-fa43-43e8-ac0a-02c784c4a4fa']">
    69         <xsl:if test="a_sWithSDS='yes'" >
     70        <xsl:if test="$a_sWithSDS='yes'" >
    7071            <xsl:call-template name="application_template" />
    7172        </xsl:if>
     
    9394Applications.
    9495-->
    95 <xsl:template match="application">
     96<xsl:template match="application" name="application_template">
    9697    <AppId>
    9798        <xsl:attribute name="Id">
     
    101102            <xsl:value-of select="@name"/> Application
    102103        </xsl:attribute>
     104        <!--
     105            The name of windows service should be defined as module name in .xidl.
     106            It's viable for correct registration of COM windows service.
     107        -->
     108        <xsl:if test="module/@context = 'LocalService'">
     109            <xsl:attribute name="LocalService" >
     110                <xsl:value-of select="module/@name"/>
     111            </xsl:attribute>
     112        </xsl:if>
    103113        <xsl:choose>
    104114            <xsl:when test="$a_sTarget = 'VBoxClient-x86'">
     
    131141      <xsl:choose>
    132142        <xsl:when test="../@context='InprocServer'">InprocServer32</xsl:when>
    133         <xsl:when test="../@context='LocalServer'">LocalServer32</xsl:when>
    134           <xsl:when test="../@context='LocalService'">LocalServer32</xsl:when>
     143        <xsl:when test="../@context='LocalServer'" >LocalServer32</xsl:when>
     144        <xsl:when test="../@context='LocalService'">LocalServer32</xsl:when>
    135145        <xsl:otherwise>
    136146          <xsl:message terminate="yes">
  • trunk/src/VBox/Main/idl/VirtualBox.xidl

    r70075 r70228  
    2447324473</if> <!-- bird: shouldn't this if-element at leat include the VBoxSDS module, if not the whole system service application? -->
    2447424474
     24475<!-- Warning: the name of module should coincide with real windows service name.
     24476     VirtualBox_Typelib.xsl and VirtualBox_TypeLibWithInterfaces.xsl uses this name to make list of COM registration
     24477     actions in Wix. Installer will not able to register COM windows service properly if the name of module
     24478     differs from SCM windows service name.
     24479     The Name of windows service is referenced in different places.
     24480     Don't forget to change it in other places too If you change it here :
     24481         VBoxMergeApp.wxi (cp_VBoxSDS component),
     24482         VBoxSDS.cpp and VBoxProxyStub.cpp
     24483     -->
    2447524484  <module name="VBoxSDS" context="LocalService">
    2447624485    <class name="VirtualBoxSDS" uuid="74ab5ffe-8726-4435-aa7e-876d705bcba5"
  • trunk/src/VBox/Main/src-all/win/VBoxProxyStub.c

    r70106 r70228  
    13161316    const char *pszLocalServer      = "VBoxSVC.exe";
    13171317#ifdef VBOX_WITH_SDS
     1318    /**
     1319    * The Name of windows service is referenced in different places.
     1320    * Don't forget to change it in other places too If you change it here :
     1321    *      VBoxMergeApp.wxi (cp_VBoxSDS component),
     1322    *      VBoxSDS.cpp and VirtualBox.xidl
     1323    */
    13181324    const char *pszSdsAppId         = "{EC0E78E8-FA43-43E8-AC0A-02C784C4A4FA}";
    13191325    const char *pszSdsExe           = "VBoxSDS.exe";
     
    24202426        if (fDeleteIt)
    24212427        {
    2422             hService = OpenServiceW(hSCM, pwszServiceName, SERVICE_STOP | DELETE);
     2428            hService = OpenServiceW(hSCM, pwszServiceName, SERVICE_STOP);
    24232429            if (hService)
    24242430            {
     
    24622468        {
    24632469            Assert(pState->fUpdate);
    2464             hSCM = OpenSCManagerW(NULL, NULL, SC_MANAGER_CREATE_SERVICE | SC_MANAGER_CONNECT);
     2470            hSCM = OpenSCManagerW(NULL, NULL, SC_MANAGER_CREATE_SERVICE);
    24652471            if (hSCM)
    24662472            {
     
    24682474                                          pwszServiceName,
    24692475                                          pwszDisplayName,
    2470                                           SERVICE_ALL_ACCESS /* dwDesiredAccess */,
     2476                                          SERVICE_CHANGE_CONFIG /* dwDesiredAccess */,
    24712477                                          uServiceType,
    24722478                                          uStartType,
     
    25452551
    25462552#ifdef VBOX_WITH_SDS
     2553        /**
     2554        * The Name of windows service is referenced in different places.
     2555        * Don't forget to change it in other places too If you change it here :
     2556        *      VBoxMergeApp.wxi (cp_VBoxSDS component),
     2557        *      VBoxSDS.cpp and VirtualBox.xidl
     2558        */
    25472559        vbpsUpdateWindowsService(&State, wszVBoxDir, L"VBoxSDS.exe", L"VBoxSDS",
    25482560                                 L"VirtualBox system service", L"Used as a COM server for VirtualBox API.");
Note: See TracChangeset for help on using the changeset viewer.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette