1
votes

Wix 3.10

After I made an installer for Windows Server Roles and Features (Wix: Cannot call DISM from Wix CustomAction) , I have several feedbacks from my superiors:

    <CustomAction Id='AddDISMComponent1' Property='DISMComponent1' Value='"[System64Folder]dism.exe" /norestart /quiet /online /enable-feature /FeatureName:IIS-WebServerRole /all /Source:[SXSFOLDER]' Execute='immediate'/>
    <CustomAction Id="DISMComponent1" BinaryKey="WixCA" DllEntry="CAQuietExec64" Execute="deferred" Return="check" Impersonate="no" />

    <CustomAction Id='AddDISMComponent2' Property='DISMComponent2' Value='"[System64Folder]dism.exe" /norestart /quiet /online /enable-feature /FeatureName:IIS-RequestFiltering /all /Source:[SXSFOLDER]' Execute='immediate'/>

    ~Snip~

    <InstallExecuteSequence>
      <Custom Action="AddDISMComponent1" After="CostFinalize" />
      <Custom Action="AddDISMComponent2" After="AddDISMComponent1" />

    ~Snip~
      <Custom Action="DISMComponent1" After="InstallInitialize"><![CDATA[(NOT Installed)]]></Custom> 
      <Custom Action="DISMComponent2" After="DISMComponent1"><![CDATA[(NOT Installed)]]></Custom> 

    </InstallExecuteSequence>  

One of its feedback is that the several DISM install sequence needs long time (approximately 5~10 minutes in my test circumstance) despite the original ProgressDlg in the standard WixUI_FeatureTree above does not show the current CA executed, status is blank....and the progress bar already reaches full when first CA starts.

So I made a CustomizedProgressDlg which have "ActionData" control instead of "ActionText" (https://www.firegiant.com/wix/tutorial/user-interface-revisited/is-this-progress/) Still I don't have image how to fulfill the "ActionData" while the CA executing.

I have Csharp sample code which returns ProgressDlg ActionData(Wix, show custom status message in ProgressDlg), but how to do it directly from QuietExec in wxs...Is there any good sample for such customized ProgressDlg?

Any ideas?

P.S I added progresstext to the installer showing current CA working, but still progress bar reaches end in first place...I returned to ActionText.

CustomizedProgressDlg.wxs

<?xml version="1.0" encoding="UTF-8"?>
<!-- Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information. -->

<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi">
    <Fragment>
        <UI>
            ~Snip~
        </Dialog>

            ~Snip~

            <Control Id="ActionText" Type="Text"
                X="70" Y="100" Width="285" Height="30">
                <Subscribe Event="ActionText" Attribute="Text" />
            </Control>
            <Control Id="ProgressBar" Type="ProgressBar" X="20" Y="115" Width="330" Height="10" ProgressBlocks="yes" Text="!(loc.ProgressDlgProgressBar)">
                <Subscribe Event="SetProgress" Attribute="Progress" />
            </Control>
            <Control Id="StatusLabel" Type="Text" X="20" Y="100" Width="50" Height="10" Text="!(loc.ProgressDlgStatusLabel)" />
        </Dialog>

            <InstallUISequence>
                <Show Dialog="CustomizedProgressDlg" Before="ExecuteAction" Overridable="yes" />
            </InstallUISequence>


            <ProgressText Action="DISMComponent1">Configuring DISMComponent1... (this may take a few minutes)</ProgressText> 
            <ProgressText Action="DISMComponent2">Configuring DISMComponent2... (this may take a few minutes)</ProgressText> 
            <ProgressText Action="DISMComponent3">Configuring DISMComponent3... (this may take a few minutes)</ProgressText> 
            <ProgressText Action="DISMComponent4">Configuring DISMComponent4... (this may take a few minutes)</ProgressText> 
            <ProgressText Action="DISMComponent5">Configuring DISMComponent5... (this may take a few minutes)</ProgressText> 
            <ProgressText Action="DISMComponent6">Configuring DISMComponent6... (this may take a few minutes)</ProgressText> 
            <ProgressText Action="DISMComponent7">Configuring DISMComponent7... (this may take a few minutes)</ProgressText> 
            <ProgressText Action="DISMComponent8">Configuring DISMComponent8... (this may take a few minutes)</ProgressText> 
            <ProgressText Action="DISMComponent9">Configuring DISMComponent9... (this may take a few minutes)</ProgressText> 
            <ProgressText Action="DISMComponent10">Configuring DISMComponent10... (this may take a few minutes)</ProgressText> 
            <ProgressText Action="DISMComponent11">Configuring DISMComponent11... (this may take a few minutes)</ProgressText> 
            <ProgressText Action="DISMComponent12">Configuring DISMComponent12... (this may take a few minutes)</ProgressText> 
            <ProgressText Action="DISMComponent13">Configuring DISMComponent13... (this may take a few minutes)</ProgressText> 
            <ProgressText Action="DISMComponent14">Configuring DISMComponent14... (this may take a few minutes)</ProgressText> 
            <ProgressText Action="DISMComponent15">Configuring DISMComponent15... (this may take a few minutes)</ProgressText> 
            <ProgressText Action="DISMComponent16">Configuring DISMComponent16... (this may take a few minutes)</ProgressText> 
            <ProgressText Action="DISMComponent17">Configuring DISMComponent17... (this may take a few minutes)</ProgressText> 
            <ProgressText Action="DISMComponent18">Configuring DISMComponent18... (this may take a few minutes)</ProgressText> 
            <ProgressText Action="DISMComponent19">Configuring DISMComponent19... (this may take a few minutes)</ProgressText> 
            <ProgressText Action="DISMComponent20">Configuring DISMComponent20... (this may take a few minutes)</ProgressText> 
            <ProgressText Action="DISMComponent21">Configuring DISMComponent21... (this may take a few minutes)</ProgressText> 
            <ProgressText Action="DISMComponent22">Configuring DISMComponent22... (this may take a few minutes)</ProgressText> 

            </UI>
    </Fragment>
</Wix>

ProgressBar reaches max

1
Not my area, but are you installing to offline images or to actual running systems? Looks like running systems? Would it be easier to install these components using Powershell instead? Maybe you need MSI for some important, practical reason? Like the .NET framework isn't installed yet so Powershell can't run?Stein Åsmul
@Stein Åsmul Let me directly answer to your questions: I am installing actual running systems with DISM, Powershell don't have GUI and I need GUI for end users who don't have knowledge to commandline or Powershell.illuminate33
Probably in the first place of client circumstance, Powershell and .NET framework isn't enabled. In manual system implementation, workers need to check many Server Manager checkboxs in IIS Role Services and .NET framework features.illuminate33
Probably smarts resolve such problem by such a small hint, but I am not...how to use tokens? stackoverflow.com/questions/2783448/…illuminate33
Reading msdn.microsoft.com/en-US/library/aa370354%28VS.85%29.aspx, I should set "Record Fields for Progress Bar Messages" in ProgressText....But still I'm not sure how to set it...illuminate33

1 Answers

0
votes

The best you can do is to use something based on custom actions reporting progress, example here:

http://microsoft.public.platformsdk.msi.narkive.com/1THI13Xw/installmessage-progress

and the MsiProcessMessage calls. You'd need to do the DISM calls from the custom action.

However the problem you're facing can't be solved properly because that example of yours has just two DISM operations, and if each of them take 5 minutes then you don't have progress, you have only half-done after 5 minutes and completely done after 10 minutes. If you have many DISM calls obviously it gets better, but either way the key is to run them from your own separate custom action that sends progress to the standard progress bar.

It's not clear to me that clients are happy with this level of OS feature control. I don't know your client base but most of the clients I know (especially those with corporate locked down systems) would be extremely annoyed at the addition of IIS.