Templates/Wizard/AdminPassword.xaml

<!--
    THE LOCAL ADMINISTRATOR PASSWORD that goes into the answer file - the one
    value a deployment can neither invent nor proceed without.
 
    THIS PAGE EXISTS BECAUSE A REAL DEPLOYMENT STOPPED WITHOUT IT. A Latitude
    running the shipped client template reached step 6 of 11 and failed with
    "stages an answer file that asks for %HDTAdminPassword%, but nothing
    supplies it ... or on the wizard's administrator password page" - naming a
    page that did not exist. The only way through was to hand-edit rules.yaml
    on the share, which is exactly the thing a technician wizard is for.
 
    TWO BOXES, BECAUSE ONE BOX IS A TYPO NOBODY SEES. A password box shows
    dots, so the only way to know what was typed is to type it twice, and
    Test-HDTAdminPassword is what compares them.
 
    NO REVEAL TOGGLE HERE, DELIBERATELY. ComputerDetail carries the
    HDTPasswordBox / HDTPasswordRevealBox / HDTPasswordRevealToggle trio that
    New-HDTWizardHost wires by name, and that wiring handles ONE pair per page.
    The confirmation box already catches the typo, so a reveal would be a
    second answer to a question this page has answered - and a local
    administrator password shown in clear on a screen that gets photographed
    is a worse trade here than on a domain join box a technician is checking
    against a written credential.
 
    xmlns AND xmlns:x ARE BOTH DECLARED. A page fragment is loaded standalone
    by XamlReader, so it carries no namespace by inheritance - and one using
    x:Name without xmlns:x throws "'x' is an undeclared prefix" at load, which
    on a bench looks like a wizard that failed to open.
 
    THE BOXES CARRY NO COLOURS. Every other control on every other page takes
    its brushes from HDTTheme.xaml; spelling them here would make this page the
    one that does not follow a retheme.
-->
<Grid xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
      xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
    <Grid.RowDefinitions>
        <RowDefinition Height="Auto" />
        <RowDefinition Height="Auto" />
        <RowDefinition Height="Auto" />
        <RowDefinition Height="*" />
    </Grid.RowDefinitions>
    <Grid.ColumnDefinitions>
        <ColumnDefinition Width="Auto" />
        <ColumnDefinition Width="*" />
    </Grid.ColumnDefinitions>
 
    <TextBlock Grid.Row="0" Grid.Column="0" Text="Administrator password" Foreground="#FF8A8A8A"
               FontSize="13" VerticalAlignment="Center" Margin="0,0,16,8"
               ToolTip="The password for the LOCAL Administrator account on the machine being deployed." />
    <PasswordBox Grid.Row="0" Grid.Column="1" x:Name="HDTAdminPasswordBox"
                 Width="380" HorizontalAlignment="Left" Margin="0,0,0,8" />
 
    <TextBlock Grid.Row="1" Grid.Column="0" Text="Confirm password" Foreground="#FF8A8A8A"
               FontSize="13" VerticalAlignment="Center" Margin="0,0,16,8"
               ToolTip="Type the same password again. A password box shows dots, so this is what catches a typo." />
    <PasswordBox Grid.Row="1" Grid.Column="1" x:Name="HDTAdminPasswordConfirmBox"
                 Width="380" HorizontalAlignment="Left" Margin="0,0,0,8" />
 
    <!--
        ONE LINE, AND IT SAYS WHAT TO DO ABOUT IT. Which account this is, and
        the fact that it can be set once for every machine instead of typed on
        every deployment - which is the thing an MDT admin actually wants to
        know and the reason the page can be skipped at all.
 
        Everything else - why HDT refuses to invent one, what DESIGN 4.5.2
        says, what happens to a blank one - is in Test-HDTAdminPassword and in
        the comment above, where the next person to change this will read it
        and a technician standing at a bench will not.
    -->
    <TextBlock Grid.Row="2" Grid.Column="1" Foreground="#FF8A8A8A" FontSize="12"
               TextWrapping="Wrap" MaxWidth="380" HorizontalAlignment="Left"
               Text="Sets the local Administrator account on this machine. Put HDTAdminPassword in rules.yaml to stop being asked." />
</Grid>