RE : Software Assurance Pays Off Remote Connection to WinPE during MDT SCCM deployments

25 10 2012

I was trying to use “unattend.xml” to enable remote control using DART 7 Remote Connection tool during WinPE
as demonstrated here:

The “unattend.xml” is residing in the root of the boot.wim – X:\Unattend.xml
The first time the machine boots in to WinPE from PXE it uses this Unattend.xml and everything works great.

However, if a step to restart the computer to the boot image assigned for the task sequence which is the same boot.wim then after the restart the original “Unattend.xml” will not be used, instead a different xml called “winpeunattend.xml” which is located at “C:\_SMSTaskSequence\WinPE\WinPEUnattend.xml”
And that XML is being created “on the fly” or in runtime, when the TS is “Staging boot.wim”
and the SMSTS.log will log: “Creating WinPE Answer File” and “Successfully saved … C:\_SMSTaskSequence\WinPE\WinPEUnattend.xml”

The task sequence is from SCCM 2007 R3 with SP2 and the Advertisement is Mandatory and configured as “Access content directly from Distribution Point”.

I finally decided to go around the problem as even in Microsoft Communities I couldn’t get this answered answered

This is what i ended up doing:

1. add the scripts (don’t forget to add ztiutility.vbs from MDT if you haven’t already) below to a folder in boot.wim (using dism)

use this command: cmd.exe /c start wscript.exe x:\deploy\scripts\startremoterecovery.wsf

<job id="LiteTouch">
   <script language="VBScript" src="ZTIUtility.vbs"/>
   <script language="VBScript">

'// Solution: Sample
'// Purpose: Used to start Remote Connection
'// Version: 1.0 - 23 July 2011 - Johan Arwidmark
'// This script is provided "AS IS" with no warranties, confers no rights and 
'// is not supported by the authors or Deployment Artist. 

Option Explicit

Dim sCmd, iRetVal

' Start RemoteRecovery.exe minimized

sCmd = "remoterecovery.exe -nomessage"
iRetVal = oSHell.Run(sCmd, 6, false)


This command start the wait for invitation script:

cscript.exe .\Distribution\Scripts\WaitForInvitation.vbs

Set fso = CreateObject("Scripting.FileSystemObject")
filespec = "X:\sms\bin\i386\inv32.xml"
'Check every 1 second to see if the file exists
While Not fso.FileExists(filespec)
 Wscript.Sleep 1000
'When it does exist, go on


followed by a command that echoes the content of the XML file to smsts.log (this adds a nicely looking ticket line to SMS Advertisement Status Reports):

cmd.exe /c type X:\sms\bin\i386\inv32.xml

as you can see i’m using the path X:\sms\bin\i386\inv32.xml but i learned later that it will work for rebuild (new installation) and not for refresh (USMT) but didn’t had time to change the path to TS Variable or just plain fix them.

and this is how it looks like when i view reports of TS Advertisement Status,

Highlighted from top to bottom is Ticket Number for DART Remote Connection Viewer, Port and IP

I use this report query to view all actions with the name “Echo Ticket Number” as a report:

                      dbo.v_Advertisement.Comment, dbo.v_Advertisement.PackageID, dbo.v_Advertisement.CollectionID
FROM         dbo.v_R_UnknownSystem FULL OUTER JOIN
                      dbo.v_Advertisement INNER JOIN
                      dbo.v_R_System INNER JOIN
                      dbo.v_TaskExecutionStatus ON dbo.v_R_System.ResourceID = dbo.v_TaskExecutionStatus.ResourceID ON 
                      dbo.v_Advertisement.AdvertisementID = dbo.v_TaskExecutionStatus.AdvertisementID ON 
                      dbo.v_R_UnknownSystem.ResourceID = dbo.v_R_System.ResourceID
WHERE     (dbo.v_TaskExecutionStatus.ActionName LIKE 'Echo Ticket Number')
ORDER BY dbo.v_TaskExecutionStatus.ExecutionTime DESC

note to self: change the filespec variable to use TS Variables because it's not the same path for Refresh as it is for Rebuild

Thanks goes to Deployment Research - Johan Arwidmark for a ingenious idea.



Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: