Regarding using BAFunctions.dll for DelayStart, it has been about a year
since I used that feature and then abandoned that code in favor of creating
a WPF managed BA (which I would also recommend, but you could use any UX
framework - MFC, WCF, Java?<smile/>).  But as I recall the basic steps are:
1) Define an overridable variable in you Bundle named DelayStart (or
whatever you choose). From:
https://wixextba.codeplex.com/SourceControl/latest#Examples/Bundle11.wxs
   
   <Variable Name="DelayStart" Type="numeric" Value="1000" />

2) Create a C++ dll project named bafunctions and add the files from
src\burn\Samples\bafunctions to your project.  Get this new project to
compile before making changes to it.

3) For the bafunctions.dll produced by the above project, add it as a
payload to your bundle.  See example here:
http://windows-installer-xml-wix-toolset.687559.n2.nabble.com/Fwd-Updating-a-msi-installed-by-bootstrapper-td7585953.html

4) Add the following code from the example here:
http://windows-installer-xml-wix-toolset.687559.n2.nabble.com/template/NamlServlet.jtp?macro=reply&node=7597747

Add it to your WixBootstrapperBAFunction.cpp file, the project you  created.
 HRESULT Delay() 
    { 
        HRESULT hr = S_OK; 
        LONGLONG llDelay = 0; 
        
        BalGetNumericVariable(L"DelayStart", &llDelay); 
        if (llDelay) 
        { 
            BalLog(BOOTSTRAPPER_LOG_LEVEL_STANDARD, "Delay for %dms",
(DWORD)llDelay); 
            ::Sleep((DWORD)llDelay); 
        } 
        
        return hr; 
    } 

public:
    STDMETHODIMP OnDetect()
    {
        HRESULT hr = S_OK;
        HKEY hkKey = NULL;
        LPWSTR sczValue = NULL;
        LPWSTR sczFormatedValue = NULL;

        DebugBreak( );

        BalLog(BOOTSTRAPPER_LOG_LEVEL_STANDARD, "Running detect BA
function");


       
//---------------------------------------------------------------------------------------------
        // Delay start to show splashscreen handling
        Delay();
       
//---------------------------------------------------------------------------------------------

    LExit:
        ReleaseRegKey(hkKey);
        ReleaseStr(sczValue);
        ReleaseStr(sczFormatedValue);

        return hr;
    }

I added a DebugBreak so that you can compile the setup and setup into the
code.



--
View this message in context: 
http://windows-installer-xml-wix-toolset.687559.n2.nabble.com/How-to-suppress-the-StdBA-Bootstrapper-UI-tp7597705p7597753.html
Sent from the wix-users mailing list archive at Nabble.com.

------------------------------------------------------------------------------
_______________________________________________
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users

Reply via email to