Tweaks to help using Litetouch OEM For All Media Deployments

By | April 4, 2017
Share
Update 2017.04.07 -> Added instruction to remove conditions on ComputerName wizard pane to force it to appear regardless of TS selected.

Advantages:

  • No more do you need to worry about the Deployed OS detecting the flash drive.

Dis-Advantages:

  • Some editing of built-in scripts is required.
  • Deployments take slightly longer, because share is copied local before beginning.

Steps:

  1. Edit the Litetouch.wsf to perform a reboot instead of a shutdown upon completion of staging the deployment share. (~ lines 997-1006)
    https://github.com/brianfgonzalez/Scripts/blob/master/LiteTouchOemReboot.wsf
  2. Add the LTIEnableDeployTs.wsf to the scripts folder. The script relies on the DS only containing one deploy task sequence with an ID beginning with a “DEP” (i.e. DEP-10X64-001).
    https://github.com/brianfgonzalez/Scripts/blob/master/LTIEnableDeployTs.wsf
  3. Lastly, Move the computer name prompt to the appear first, even before the task sequence selection is presented.  Also remove any/all “Condition” xml blocks. This is to work-around the pane not appearing, when a litetouch task sequence is specified.

Other notes:

  • The SkipFinalSummary rule cannot be set to YES. The “Reboot prompt when the staging is complete.”
  • The SkipTaskSequence rule cannot be set to YES. This breaks the LTIOem built-in script. However, The TaskSequenceID rule can be set to preselect a TS.

/BG

Copy an MDT Deployment Share to a USB without building a Media Share

By | March 27, 2017
Share

*Updated to support both x86/x64 boot wims.

This script copies an MDT Deployment Share to a USB drive and basically converts it to a media share in the process.  You must edit and update the “DrvLetter” variable. Please the batch file beside the “Deploy” folder.

@setlocal enableextensions enabledelayedexpansion
@echo off

REM Variables that require updating
SET OsWimName=101607_20170302
SET DrvLetter=E:

REM Optional Variables
REM Set to yes if you wish to delete the Os wims from Usb prior to update
SET DelOsWim=N

REM Do NOT change these variables
REM Get scriptdir withOUT trailing backslash
SET scriptdir=%~dp0
SET scriptdir=%scriptdir:~0,-1%
SET mountdir=c:\mnt
SET XF="LiteTouchPE*.wim" "*.iso" "*Media*.bat" MDT*.application *Sorter.ps1 CreateISO.bat autorun.inf
SET XD="%scriptdir%\Deploy\Working" "%scriptdir%\Deploy\Captures" "%scriptdir%\Deploy\Operating Systems"
SET UsbBootWim64=%~dp0Deploy\Boot\USBLtPe_x64.wim
SET UsbBootWim86=%~dp0Deploy\Boot\USBLtPe_x86.wim

REM Del existing Os Wims if exists, this makes sure that Rc doesn't fail on low disk space check
IF %DelOsWim%==Y (
IF EXIST "%DrvLetter%\Deploy\Operating Systems" RD "%DrvLetter%\Deploy\Operating Systems" /S /Q
)

REM Update all content excluding Os Imgs and Boot Imgs
echo Copy all content excluding OS wim...
robocopy "%scriptdir%" "%DrvLetter%" /e /purge /a-:hs /mt /purge /njh /njs /xf %XF% /xd %XD%

REM Copy ONLY the desired OS Wim
echo Copy Os wim files.
robocopy "%scriptdir%" "%DrvLetter%" %OsWimName%*.swm %OsWimName%*.wim /e /njh /njs
REM if error on wim may need to be split to fit on Fat32
IF %ERRORLEVEL% GTR 3 CALL :ERROR "failed(%ERRORLEVEL%) to copy Os image."

IF EXIST "%~dp0Deploy\Boot\LiteTouchPE_x64.wim" (
echo Begin updating Boot wims Bs ini...
REM Bootx64 Section
xcopy "%~dp0Deploy\Boot\x64" "%DrvLetter%\" /HEYI
REM Copy Orig LiteTouchPE Wim to begin creating media Wim
copy "%~dp0Deploy\Boot\LiteTouchPE_x64.wim" "%UsbBootWim64%" /Y
REM Mount USBLtPe_x64.wim to inject media bootstrap.ini
IF NOT EXIST "%mountdir%" (md "%mountdir%")
dism /mount-image /imagefile:"%UsbBootWim64%" /index:1 /mountdir:"%mountdir%"
IF %ERRORLEVEL% GTR 3 CALL :ERROR "failed(%ERRORLEVEL%) to mount %UsbBootWim64% wim."

REM Overwrite Bootstrap,ini file in Boot wim
echo [Settings]> "%mountdir%\Deploy\scripts\Bootstrap.ini"
echo Priority=Default>> "%mountdir%\Deploy\scripts\Bootstrap.ini"
echo [Default]>> "%mountdir%\Deploy\scripts\Bootstrap.ini"
echo SkipBDDWelcome=YES>> "%mountdir%\Deploy\scripts\Bootstrap.ini"

REM Unmount Litetouch WIM image
echo Un-mount updated boot wim...
dism /unmount-image /mountdir:%mountdir% /commit
REM if error on unmount, exit script
IF %ERRORLEVEL% GTR 3 CALL :ERROR "failed(%ERRORLEVEL%) to un-mount %UsbBootWim64% wim."

call :UpdateBcd LiteTouchPE_x64.wim
)

IF EXIST "%~dp0Deploy\Boot\LiteTouchPE_x86.wim" (
REM Bootx64 Section
xcopy "%~dp0Deploy\Boot\x86" "%DrvLetter%\" /heyi
REM Copy Orig LiteTouchPE Wim to begin creating media Wim
copy "%~dp0Deploy\Boot\LiteTouchPE_x86.wim" "%UsbBootWim86%" /y
REM Mount USBLtPe_x64.wim to inject media bootstrap.ini
IF NOT EXIST "%mountdir%" (md "%mountdir%")
dism /mount-image /imagefile:"%UsbBootWim86%" /index:1 /mountdir:"%mountdir%"
IF %ERRORLEVEL% GTR 3 CALL :ERROR "failed(%ERRORLEVEL%) to mount %UsbBootWim86% wim."

REM Overwrite Bootstrap,ini file in Boot wim
echo [Settings]> "%mountdir%\Deploy\scripts\Bootstrap.ini"
echo Priority=Default>> "%mountdir%\Deploy\scripts\Bootstrap.ini"
echo [Default]>> "%mountdir%\Deploy\scripts\Bootstrap.ini"
echo SkipBDDWelcome=YES>> "%mountdir%\Deploy\scripts\Bootstrap.ini"

REM Unmount Litetouch WIM image
dism /unmount-image /mountdir:%mountdir% /commit
REM if error on unmount, exit script
IF %ERRORLEVEL% GTR 0 CALL :ERROR "failed(%ERRORLEVEL%) to un-mount %UsbBootWim86% wim."

call :UpdateBcd LiteTouchPE_x86.wim
)

:OverwriteBootWims
IF EXIST "%UsbBootWim64%" (
copy "%UsbBootWim64%" "%DrvLetter%\Deploy\Boot\LiteTouchPE_x64.wim" /Y
del "%UsbBootWim64%" /F /Q
)
IF EXIST "%UsbBootWim86%" (
copy "%UsbBootWim86%" "%DrvLetter%\Deploy\Boot\LiteTouchPE_x86.wim" /Y
del "%UsbBootWim86%" /F /Q
)

REM Create media.tag file
echo.> "%DrvLetter%\Deploy\Scripts\media.tag"

REM Overwrite Bootstrap,ini file outside of Boot wim
echo [Settings]> "%DrvLetter%\Deploy\Control\Bootstrap.ini"
echo Priority=Default>> "%DrvLetter%\Deploy\Control\Bootstrap.ini"
echo [Default]>> "%DrvLetter%\Deploy\Control\Bootstrap.ini"
echo SkipBDDWelcome=YES>> "%DrvLetter%\Deploy\Control\Bootstrap.ini"

label %DrvLetter% %OsWimName%

echo Script completed with no errors...
pause
exit

:UpdateBcd
echo Begin updating of Bcd entries...
DEL "%DrvLetter%\Boot\BCD" /F /Q
%WinDir%\System32\bcdedit.exe -createstore %DrvLetter%\Boot\BCD
SET BCDEDIT=bcdedit -store "%DrvLetter%\Boot\BCD"
%BCDEDIT% -create {ramdiskoptions} -d "Ramdisk options"
%BCDEDIT% -set {ramdiskoptions} ramdisksdidevice boot
%BCDEDIT% -set {ramdiskoptions} ramdisksdipath \Boot\boot.sdi
FOR /f "tokens=3" %%a in ('%BCDEDIT% -create -d "WinPE" -application osloader') do set GUID=%%a
%BCDEDIT% -set %GUID% systemroot \Windows
%BCDEDIT% -set %GUID% detecthal Yes
%BCDEDIT% -set %GUID% winpe Yes
%BCDEDIT% -set %GUID% osdevice ramdisk=[boot]\Deploy\Boot\%1,{ramdiskoptions}
%BCDEDIT% -set %GUID% device ramdisk=[boot]\Deploy\Boot\%1,{ramdiskoptions}
%BCDEDIT% -create {bootmgr} -d "Windows Boot Manager"
%BCDEDIT% -set {bootmgr} timeout 30
%BCDEDIT% -set {bootmgr} displayorder %GUID%
exit /b 0

:ERROR
echo %1
pause
exit /b 0

/BG

How to Add “Deployment Duration” to the MDT Litetouch’s Final Summary Page

By | March 19, 2017
Share

1. Add a step in Task Sequence to create a “.tag” file named after the OsdComputerName, which will be later used to determine the deployment duration.

Command Line: cmd /c echo. > “Z:\Logs\%OsdComputerName%.tag”

2. Add a Task Sequence step to sync time with Deployment Server during the State Restore phase.

Command Line: cmd /c net time \\192.168.56.1 /set /y

3. Update the LTICleanup.wsf script to add “DeploymentDuration” to results.xml file.

~ line 225

' Pull Deployment Time from ComputerName.tag file.
sFilePath = oEnvironment.Item("DeployRoot") & "\Logs\" & oEnv("ComputerName") & ".tag"
If oFSO.FileExists(sFilePath) Then
  set oFile = oFSO.GetFile(sFilePath)
  sMinutesRunning = datediff("n", oFile.DateLastModified, now)
Else
	sMinutesRunning = sFilePath & " not found"
End If

' Save the results
Set oResults = oUtility.CreateXMLDOMObject
oResults.LoadXml "<?xml version=""1.0"" ?><Results><Errors>" & iErrors & "</Errors><Warnings>" & _
  iWarnings & "</Warnings><RetVal>" & oEnvironment.Item("RETVAL") & _
  "</RetVal><DeploymentType>" & oEnvironment.Item("DeploymentType") & _
  "</DeploymentType><Messages><![CDATA[" & sBuffer & "]]></Messages>" & _
  "<DeploymentDuration>" & sMinutesRunning & "</DeploymentDuration>" & _
  "</Results>"
oResults.Save oEnv("TEMP") & "\Results.xml"
oResults.Save sArchiveDir & "\DeploymentLogs\Results.xml"

4. Update Summary_scripts.vbs and Summary_Definition_ENU.xml to Display Deployment Duration.

Lines added to Summary_scripts are marked below.

' // ***************************************************************************
' // 
' // Copyright (c) Microsoft Corporation.  All rights reserved.
' // 
' // Microsoft Deployment Toolkit Solution Accelerator
' //
' // File:      Summary_scripts.vbs
' // 
' // Version:   6.3.8443.1000
' // 
' // Purpose:   Scripts to initialize and validate summary wizard
' // 
' // ***************************************************************************

Option Explicit

Dim iErrors
Dim iWarnings
Dim sBuffer
Dim sDeploymentType
'////////////
Dim iDeploymentDuration
'\\\\\\\\\\\\

Function InitializeSummary

  Dim oResults
  Dim iRetVal


  ' Load the results

  If oFSO.FileExists(oEnv("TEMP") & "\Results.xml") then
    Set oResults = oUtility.CreateXMLDOMObjectEx(oEnv("TEMP") & "\Results.xml")
    iErrors = CInt(oUtility.SelectSingleNodeString(oResults, "//Errors"))
    iWarnings = CInt(oUtility.SelectSingleNodeString(oResults, "//Warnings"))
    sBuffer = oUtility.SelectSingleNodeString(oResults, "//Messages")
    iRetVal = oUtility.SelectSingleNodeString(oResults, "//RetVal")  
    sDeploymentType = oUtility.SelectSingleNodeString(oResults, "//DeploymentType")
'////////////
    iDeploymentDuration = oUtility.SelectSingleNodeString(oResults, "//DeploymentDuration")
'\\\\\\\\\\\\
  Else
    iErrors = 0
    iWarnings = 1
    sBuffer = "Unable to locate the Results.xml file needed to determine the deployment results.  "
    sBuffer = sBuffer & "(This may be the result of mismatched script versions.  Ensure all boot images have been updated.)"
  End if
  

  ' If this is a replace, then modifiy the title

  If sDeploymentType = "REPLACE" then
    NormalTitle.style.display = "none"
    ReplaceTitle.style.display = "inline"
  End if


  ' Set the background color based on the return code

  If iRetVal = "0" or iRetVal = "" then
    If iErrors > 0 or iWarnings > 0 then
      MyContentArea.style.backgroundColor = "yellow"
    End if
  Else
    MyContentArea.style.backgroundColor = "salmon"
  End if

  ' Update the dialog
  ErrorCount.InnerText = CStr(iErrors)
  WarningCount.InnerText = CStr(iWarnings)
  optionalWindow1.InnerText = sBuffer
'////////////
  DeploymentDuration.InnerText = iDeploymentDuration
'\\\\\\\\\\\\
  buttonCancel.disabled = true
  

End Function

Summary_Definition_ENU.xml changes are also marked below.

<?xml version="1.0" encoding="utf-8" ?>
<!--

' // ***************************************************************************
' // 
' // Copyright (c) Microsoft Corporation.  All rights reserved.
' // 
' // Microsoft Deployment Toolkit Solution Accelerator
' //
' // File:      Summary_Definition_ENU.xml
' // 
' // Version:   6.3.8443.1000
' // 
' // Purpose:   Display summary results for a Lite Touch deployment
' // 
' // ***************************************************************************

-->
<Wizard>
  <Global>
    <CustomStatement><![CDATA[ document.title =  "Deployment Summary" ]]> </CustomStatement>
    <CustomStatement><![CDATA[ window.resizeTo 700,500 ]]> </CustomStatement>
    <CustomStatement><![CDATA[ window.moveTo Window.screen.width/2 - 700/2, Window.screen.height/2 - 500/2 ]]> </CustomStatement>
    <Initialization>Summary_Scripts.vbs</Initialization>
    <HideNavigation>true</HideNavigation>
  </Global>

  <Pane id="Success">
    <Condition><![CDATA[ UCase(Property("SkipFinalSummary")) <> "YES" and Property("RetVal") = "0" or Property("RetVal") = "" ]]></Condition>
    <ButtonNext>
      <Label><![CDATA[<button accesskey=F id=buttonNext language=vbscript onclick=ButtonNextClick><U>F</U>inish</button>]]></Label>
    </ButtonNext>
    <ButtonPrev>
      <Label><![CDATA[<button accesskey=B id=buttonPrev style='display: none;' onclick="ButtonBackClick"><U>B</U>ack</button>]]></Label>
    </ButtonPrev>
    <Body>
    <![CDATA[
      <H1 id=NormalTitle>Operating system deployment completed successfully.</H1>
      <H1 id=ReplaceTitle style="display: none;">The user state capture was completed successfully.</H1>
            <p>The computer is now ready to use.</p>
      <p>During the deployment process, <span id=ErrorCount>0</span> errors and <span id=WarningCount>0</span> warnings were reported.</p>
      <p>Deployment has been running for approximately <span id=DeploymentDuration>0</span> minutes.</p>

      <p>
                <input id=MoreInfo src=plusicon.gif type=image onclick="javascript:HideUnHideCmdWindow(optionalWindow1);" />
        <label onclick="javascript:MoreInfo.click();" >Details ...</label>
        <span id=optionalWindow1 style="" class=LightColoredBox></span>
      </p>
    ]]>
    </Body>
    <Initialization><![CDATA[ InitializeSummary ]]></Initialization>
  </Pane>

  <Pane id="Failure">
    <Condition><![CDATA[ Property("RetVal") <> "0" and Property("RetVal") <> ""]]></Condition>
    <ButtonNext>
      <Label><![CDATA[<button accesskey=F id=buttonNext language=vbscript onclick=ButtonNextClick><U>F</U>inish</button>]]></Label>
    </ButtonNext>
    <ButtonPrev>
      <Label><![CDATA[<button accesskey=B id=buttonPrev style='display: none;' onclick="ButtonBackClick"><U>B</U>ack</button>]]></Label>
    </ButtonPrev>
    <Body>
    <![CDATA[
      <H1 id=NormalTitle>Operating system deployment did not complete successfully.</H1>
      <H1 id=ReplaceTitle style="display: none;">The user state capture did not complete successfully.</H1>
        <p>Please review the log files to determine the cause of the problem.</p>
      <p>During the deployment process, <span id=ErrorCount>0</span> errors and <span id=WarningCount>0</span> warnings were reported.</p>

      <p>
                <input id=MoreInfo src=plusicon.gif type=image onclick="javascript:HideUnHideCmdWindow(optionalWindow1);" />
        <label onclick="javascript:MoreInfo.click();" >Details ...</label>
        <span id=optionalWindow1 style="display=none;" class=LightColoredBox></span>
      </p>
    ]]>
    </Body>
    <Initialization><![CDATA[ InitializeSummary ]]></Initialization>
  </Pane>

</Wizard>

Updated source files can also be accessed here: https://github.com/brianfgonzalez/Scripts/tree/master/Deployment%20Duration

 

/BG

MY ZTIDefaultAssociations.wsf MDT Script for Force Applying File Associations in Windows 10

By | March 4, 2017
Share

GitHub Link: https://github.com/brianfgonzalez/Scripts/blob/master/ZTIDefaultAssociations.wsf

<job id="ZTIDefaultAssociations">
   <script language="VBScript" src="../../Scripts/ZTIUtility.vbs"/>
   <script language="VBScript">
' // ***************************************************************************
' // 
' // Copyright (c) Microsoft Corporation.  All rights reserved.
' // 
' // Microsoft Deployment Toolkit Solution Accelerator
' //
' // File:      ZTIDefaultAssociations.wsf
' // 
' // Version:   6.3.8443.1000
' // 
' // Purpose:   Use Dism to force apply start screen layout.
' // 
' // Usage:     cscript ZTIDefaultAssociations.wsf [/debug:true] [/UDI]
' // 
' // ***************************************************************************
Option Explicit
RunNewInstance
'//----------------------------------------------------------------------------
'//  Main Class
'//----------------------------------------------------------------------------
Class ZTIDefaultAssociations
  '//----------------------------------------------------------------------------
  '//  Main routine
  '//----------------------------------------------------------------------------
  Function Main
  
    '//----------------------------------------------------------------------------
    '//  Declare variables
    '//----------------------------------------------------------------------------
    Dim iRetVal
    iRetVal = Success
    '//----------------------------------------------------------------------------
    '//  Copying OEMDefaultAssociations.xml file
    '//----------------------------------------------------------------------------
    oLogging.CreateEntry "Copying OEMDefaultAssociations.xml to Windows\System32.", LogTypeInfo
    oFileHandling.CopyFile oUtility.ScriptDir & "\OEMDefaultAssociations.xml", oEnv("WinDir") & "\System32\OEMDefaultAssociations.xml", true
	oFileHandling.CopyFile oUtility.ScriptDir & "\fz-a2_specsheet.pdf", oEnv("SystemDrive") & "\Users\Public\Desktop\fz-a2_specsheet.pdf", true
	oFileHandling.CopyFile oUtility.ScriptDir & "\fz-q2_specsheet.pdf", oEnv("SystemDrive") & "\Users\Public\Desktop\fz-q2_specsheet.pdf", true
	oFileHandling.CopyFile oUtility.ScriptDir & "\Toughbook.url", oEnv("SystemDrive") & "\Users\Public\Desktop\Toughbook.url", true
    '//----------------------------------------------------------------------------
    '//  Specify to use OEMDefaultAssociations via Registry
    '//----------------------------------------------------------------------------
    oLogging.CreateEntry "Import DefaultAssociationsConfiguration Reg Key.", LogTypeInfo
	iRetVal = oUtility.RegWrite("HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\System\DefaultAssociationsConfiguration", oEnv("WinDir") & "\System32\OEMDefaultAssociations.xml")
  End Function
End Class
    </script>
</job>

GitHub Link: https://github.com/brianfgonzalez/Scripts/blob/master/OEMDefaultAssociations.xml

<?xml version="1.0" encoding="UTF-8"?>
<DefaultAssociations>
  <Association Identifier=".3gp2" ProgId="WMP11.AssocFile.3G2" ApplicationName="Windows Media Player" />
  <Association Identifier=".acrobatsecuritysettings" ProgId="AcroExch.acrobatsecuritysettings" ApplicationName="Adobe Acrobat Reader DC" />
  <Association Identifier=".fdf" ProgId="AcroExch.FDFDoc" ApplicationName="Adobe Acrobat Reader DC" />
  <Association Identifier=".htm" ProgId="ChromeHTML" ApplicationName="Google Chrome" />
  <Association Identifier=".html" ProgId="ChromeHTML" ApplicationName="Google Chrome" />
  <Association Identifier=".MP2" ProgId="WMP11.AssocFile.MP3" ApplicationName="Windows Media Player" />
  <Association Identifier=".mpeg" ProgId="WMP11.AssocFile.mpeg" ApplicationName="Windows Media Player" />
  <Association Identifier=".oxps" ProgId="Windows.XPSReachViewer" ApplicationName="XPS Viewer" />
  <Association Identifier=".pdf" ProgId="AcroExch.Document.DC" ApplicationName="Adobe Acrobat Reader DC" />
  <Association Identifier=".pdfxml" ProgId="AcroExch.pdfxml" ApplicationName="Adobe Acrobat Reader DC" />
  <Association Identifier=".pdx" ProgId="PDXFileType" ApplicationName="Adobe Acrobat Reader DC" />
  <Association Identifier=".shtml" ProgId="ChromeHTML" ApplicationName="Google Chrome" />
  <Association Identifier=".tif" ProgId="PhotoViewer.FileAssoc.Tiff" ApplicationName="Windows Photo Viewer" />
  <Association Identifier=".tiff" ProgId="PhotoViewer.FileAssoc.Tiff" ApplicationName="Windows Photo Viewer" />
  <Association Identifier=".txt" ProgId="txtfile" ApplicationName="Notepad" />
  <Association Identifier=".url" ProgId="IE.AssocFile.URL" ApplicationName="Internet Browser" />
  <Association Identifier=".webp" ProgId="ChromeHTML" ApplicationName="Google Chrome" />
  <Association Identifier=".website" ProgId="IE.AssocFile.WEBSITE" ApplicationName="Internet Explorer" />
  <Association Identifier=".xdp" ProgId="AcroExch.XDPDoc" ApplicationName="Adobe Acrobat Reader DC" />
  <Association Identifier=".xfdf" ProgId="AcroExch.XFDFDoc" ApplicationName="Adobe Acrobat Reader DC" />
  <Association Identifier=".xht" ProgId="ChromeHTML" ApplicationName="Google Chrome" />
  <Association Identifier=".xhtml" ProgId="ChromeHTML" ApplicationName="Google Chrome" />
  <Association Identifier=".xps" ProgId="Windows.XPSReachViewer" ApplicationName="XPS Viewer" />
  <Association Identifier="ACROBAT" ProgId="acrobat" ApplicationName="Adobe Acrobat Reader DC" />
  <Association Identifier="bingmaps" ProgId="AppXp9gkwccvk6fa6yyfq3tmsk8ws2nprk1p" ApplicationName="Maps" />
  <Association Identifier="FTP" ProgId="ChromeHTML" ApplicationName="Google Chrome" />
  <Association Identifier="http" ProgId="ChromeHTML" ApplicationName="Google Chrome" />
  <Association Identifier="https" ProgId="ChromeHTML" ApplicationName="Google Chrome" />
  <Association Identifier="IRC" ProgId="ChromeHTML" ApplicationName="Google Chrome" />
  <Association Identifier="mailto" ProgId="ChromeHTML" ApplicationName="Google Chrome" />
  <Association Identifier="MMS" ProgId="ChromeHTML" ApplicationName="Google Chrome" />
  <Association Identifier="NEWS" ProgId="ChromeHTML" ApplicationName="Google Chrome" />
  <Association Identifier="NNTP" ProgId="ChromeHTML" ApplicationName="Google Chrome" />
  <Association Identifier="SMS" ProgId="ChromeHTML" ApplicationName="Google Chrome" />
  <Association Identifier="SMSTO" ProgId="ChromeHTML" ApplicationName="Google Chrome" />
  <Association Identifier="TEL" ProgId="ChromeHTML" ApplicationName="Google Chrome" />
  <Association Identifier="URN" ProgId="ChromeHTML" ApplicationName="Google Chrome" />
  <Association Identifier="WEBCAL" ProgId="ChromeHTML" ApplicationName="Google Chrome" />
</DefaultAssociations>

/BG

My ZTIStartLayoutConfig.wsf for applying a Windows 10 start layout and taskbar setup with MDT/SCCM.

By | March 4, 2017
Share

Note: You must copy your desired LNK files over to the AllUsersProfiles before adding them to the start layout or taskbar.

GitHub link: https://github.com/brianfgonzalez/Scripts/blob/master/ZTIStartLayoutConfig.wsf

<job id="ZTIStartLayoutConfig">
   <script language="VBScript" src="../../Scripts/ZTIUtility.vbs"/>
   <script language="VBScript">
' // ***************************************************************************
' // 
' // Copyright (c) Microsoft Corporation.  All rights reserved.
' // 
' // Microsoft Deployment Toolkit Solution Accelerator
' //
' // File:      ZTIStartLayoutConfig.wsf
' // 
' // Version:   6.3.8443.1000
' // 
' // Purpose:   Use Dism to force apply start screen layout.
' // 
' // Usage:     cscript ZTIStartLayoutConfig.wsf [/debug:true] [/UDI]
' // 
' // ***************************************************************************
Option Explicit
RunNewInstance
'//----------------------------------------------------------------------------
'//  Main Class
'//----------------------------------------------------------------------------
Class ZTIStartLayoutConfig
  '//----------------------------------------------------------------------------
  '//  Main routine
  '//----------------------------------------------------------------------------
  Function Main
    '//----------------------------------------------------------------------------
    '//  Declare variables
    '//----------------------------------------------------------------------------
    Dim iRetVal
    iRetVal = Success
    '//----------------------------------------------------------------------------
    '//  Copying StartLayout.xml file
    '//----------------------------------------------------------------------------
    oLogging.CreateEntry "Copying StartLayout.xml to Windows\System32.", LogTypeInfo
    oFileHandling.CopyFile oUtility.ScriptDir & "\StartLayout.xml", oEnv("SystemDrive") & "\Windows\System32\StartLayout.xml", true
    '//----------------------------------------------------------------------------
    '//  Copy Desired lnk files to %ALLUSERSPROFILES%
    '//----------------------------------------------------------------------------
    oLogging.CreateEntry "Copy Desired lnk files to %ALLUSERSPROFILES%.", LogTypeInfo
    oFileHandling.CopyFile oUtility.ScriptDir & "\File Explorer.lnk", oEnv("AllUsersProfile") & "\Microsoft\Windows\Start Menu\Programs\System Tools\File Explorer.lnk", true
    oFileHandling.CopyFile oUtility.ScriptDir & "\Internet Explorer.lnk", oEnv("AllUsersProfile") & "\Microsoft\Windows\Start Menu\Programs\Accessories\Internet Explorer.lnk", true
    oFileHandling.CopyFile oUtility.ScriptDir & "\Google Chrome.lnk", oEnv("AllUsersProfile") & "\Microsoft\Windows\Start Menu\Programs\Google Chrome.lnk", true
    '//----------------------------------------------------------------------------
    '//  Apply start screen layout using Dism
    '//----------------------------------------------------------------------------
    oLogging.CreateEntry "Importing StartLayout.xml using Powershell's Import-StartLayout cmdlet.", LogTypeInfo
    iRetVal = oUtility.RunWithConsoleLogging("powershell.exe -ExecutionPolicy ByPass -Command ""Import-StartLayout -MountPath " & oEnv("SystemDrive") & "\ -LayoutPath " & oEnv("WinDir") & "\System32\StartLayout.xml""")
  End Function
End Class
    </script>
</job>

And here is an example StartLayout.xml:

GitHub Link: https://github.com/brianfgonzalez/Scripts/blob/master/StartLayout.xml

<LayoutModificationTemplate
    xmlns="http://schemas.microsoft.com/Start/2014/LayoutModification"
    xmlns:defaultlayout="http://schemas.microsoft.com/Start/2014/FullDefaultLayout"
    xmlns:start="http://schemas.microsoft.com/Start/2014/StartLayout"
    xmlns:taskbar="http://schemas.microsoft.com/Start/2014/TaskbarLayout"
    Version="1">
	<LayoutOptions StartTileGroupCellWidth="6" />
	<DefaultLayoutOverride>
		<StartLayoutCollection>
			<defaultlayout:StartLayout GroupCellWidth="6" xmlns:defaultlayout="http://schemas.microsoft.com/Start/2014/FullDefaultLayout">
				<start:Group Name="Panasonic Apps" xmlns:start="http://schemas.microsoft.com/Start/2014/StartLayout">
					<start:DesktopApplicationTile Size="2x2" Column="0" Row="0" DesktopApplicationLinkPath="%ALLUSERSPROFILE%\Microsoft\Windows\Start Menu\Programs\Accessories\Internet Explorer.lnk" />
					<start:DesktopApplicationTile Size="2x2" Column="2" Row="0" DesktopApplicationLinkPath="%ALLUSERSPROFILE%\Microsoft\Windows\Start Menu\Programs\Google Chrome.lnk" />
				</start:Group>
			</defaultlayout:StartLayout>
		</StartLayoutCollection>
	</DefaultLayoutOverride>
	<CustomTaskbarLayoutCollection PinListPlacement="Replace">
		<defaultlayout:TaskbarLayout>
			<taskbar:TaskbarPinList>
				<taskbar:DesktopApp DesktopApplicationLinkPath="%ALLUSERSPROFILE%\Microsoft\Windows\Start Menu\Programs\System Tools\File Explorer.lnk" />
				<taskbar:DesktopApp DesktopApplicationLinkPath="%ALLUSERSPROFILE%\Microsoft\Windows\Start Menu\Programs\Accessories\Internet Explorer.lnk" />
				<taskbar:DesktopApp DesktopApplicationLinkPath="%ALLUSERSPROFILE%\Microsoft\Windows\Start Menu\Programs\Google Chrome.lnk" />
			</taskbar:TaskbarPinList>
		</defaultlayout:TaskbarLayout>
	</CustomTaskbarLayoutCollection>
</LayoutModificationTemplate>

/BG