Integrating DaRT 8.0 SP1 Remote Connection into the SCCM 2012 OSD Process

While preparing for an SCCM 2012 upgrade, I thought it might be a good idea to consider implementing some of the best practices that are around such as integrating the DaRT Remote Connection tool into the OSD deployment process. I’m sure it comes in handy when having to troubleshoot OSD related tings, as it allows us to access the client remotely without having to give lengthy instructions to an onsite engineer.

I know others have written about this before, but it appeared to me that most content relates to MDT or SCCM 2007, so I thought it’s worth writing down an update for those using the latest Dart 8.x version and SCCM 2012 SP1. Nevertheless the following blog posts served as great input for what is described below.

Software Assurance Pays Off – Remote Connection to WinPE during MDT/SCCM deployments by johan arwidmark

Remote Connection to WinPE during SCCM deployments – creating shortcuts with Ticket numbers and IP on a file share by Alexey Semibratov

MDT 2012 New Feature: DaRT integration by Michael Niehaus

Note that the DaRT Remote Connection tool is part of the Microsoft Diagnostics and Recovery Toolset, a core component of the Microsoft Desktop Optimization Pack (MDOP) available for customers with Software Assurance.

1. Install  DaRT 8.0 SP1. The installation MSI can be found on the MDOP installation media. (\DaRT\Installers\x64)

2. When installed you will find a Toolsx86.cab and Toolsx64.cab file located in the "C:\Program Files\Microsoft DaRT 8\v8\” directory.

3. Create the following folder structure that you can access later when preparing the boot image in SCCM.
..\PreStart_x64\CM12Dart\Windows\System32

The below screen shot shows the structure I have in my lab. 

image

4. Extract the following files from the CAB file. (note that I use the 64 Bit version of the CAB file)

FirewallExceptionChange.dll
LockingHooks.dll
mfc100u.dll
MSDartCmn.dll
msvcp100.dll
msvcr100.dll
RdpCore.dll
rdpencom.dll
RemoteRecovery.exe
WaitForConnection.exe

and copy them all into the previously created .\PreStart_x64\CM12Dart\Windows\System32 folder. If you have no tools available to extract the files from the CAB file you can get them later in the process when we generate the DartConfig.dat file in step 7.

5. Next download the StartRemoteRecovery.zip created by Alexey Semibratov from here. From the archive file extract

StartRemoteRecovery.wsf
ZTIUtility.vbs

and copy them as well into the previously created System32 folder. Use the ZTIUtility.vbs provided. Replacing it with a newer one with cause the script to fail.

6. Since the script was originally written for DaRT 7, the line (124) containing the path to the DaRT Remote Viewer Tool must be updated.Replace the path with ""C:\Program Files\Microsoft DaRT 8\v8\DartRemoteViewer.exe" as shown below.

image

In order to easily identify the created shortcut we add the following code which creates the OSD environment variable DartShortCut

‘ create a variable that represents the shortcut name
oEnvironment.Item("DaRTShortCut") = oEnvironment.Item("ShortCutShare") & "\" & sShortcutName & ".lnk"

I haven’t had time for this yet, but the plan is to add a step to the Task Sequence to remove the link, so that our share doesn’t get filled with outdated connection links. I’ve therefore already created the variable.

7. Since on some networks not just all ports are open we are going to use a static port. e.g. 3388. Unfortunately this information is stored in a file called DartConfig.dat that can only be generated using the DaRT Recovery Image wizard that we have installed in step 1.

image

On the next page just select Next. Then select “Allow remote connections” and “specify the port number

image

Skip through the following Wizard pages until you get here. Select “Edit Image”.

image

Now wait while the DaRT image is generated. (This can take a while). Then select “Open in Windows Explorer

image

From the System32 folder copy the DartConfig.DAT and copy it into the ..\PreStart_x64\CM12Dart\Windows\System32 folder. If you did not extract the files from the CAB file in Step 4, you find them here as well. When done close the Explorer.

image

Going back to the wizard you can either select Cancel or Create.

8. Then create a batch file called PRESTART.CMD with the following content and copy that file into the .\PreStart_x64\CM12Dart folder

@echo off
XCOPY CM12DART X:\ /y /s
CSCRIPT X:\Windows\System32\StartRemoteRecovery.wsf /ShortCutShare:<\\servername\share> /UserID:<username> /UserDomain:<domain> /UserPassword:<password>

If you do not have a general purpose share in place yet, create one. I used the following:

\\labsccm01\Dart_Remote

9. Open the configuration manager console and open the Software Library Node. To not make this blog post too lengthy I am just going to assume that you’re familiar with creating a new or updating an existing boot image. Otherwise follow the steps described here.

Within the Image properties select the “Customization” tab. Select “Enable prestart command”. Then within the command line add:
cmd.exe /c PRESTART.CMD

Select “Include files for the prestart command” and navigate to the .\PreStart_x64 folder

Then Click “Apply” to save the changes.

image

Now that we have put everything in place, let’s start the OS Deployment Task Sequence. I am using SCCM boot media here, so I have booted my VM with SCCM Boot media that I have previously created.

image

As soon as we hit “Next” the prestart command kicks in and launches the DaRT Remote Connection tool, that sits minimized in the corner of the screen.

image

Now heading over to the Server where I have installed the DaRT Remote Viewer Tool and open the Share where the shortcut link is automatically created by the StartRemoteRecovery.wsf script.

image

and there you go, we now have a remote connection into our OS Deployment session.

image

Note that as soon as the client starts into Windows we loose the ability to use the DaRT remote connection tool 

Any comments are welcome.

17 Replies to “Integrating DaRT 8.0 SP1 Remote Connection into the SCCM 2012 OSD Process”

  1. Hello,

    Very good article, but I can’t get this to work. I exactly did what you specify. But upon entering password for Task Sequence, it’s not showing Remote Connection (I know it will show as minimized) at all.

    Boot image is working with or without PreStart files.
    OS Deployment is fine.

    I suspect something went wrong when I enter the PRESTART.CMD code:

    @echo off
    XCOPY CM12DART X:\ /y /s
    CSCRIPT X:\Windows\System32\StartRemoteRecovery.wsf /ShortCutShare:\\SCCM-LAB\DART_Remote /UserID:SCCMAdmin /UserDomain:CONTOSO.LOCAL /UserPassword:P@ssw0rd!

    Also do I need to select PreStart_x64 folder or CM12DART folder in Source Directory selection?

    Any further help would be greatly appreciated. Thank you!

  2. Never mind. After providing FQDN and changing the path in Source Directory field, it’s working! Thanks!!

  3. Hi There,

    My boot image is not able to trigger the command prestart.cmd automatically. If i got to my client machine and map the drive and run the command manually everything works fine.

    Any help is much appreciated.

    Thanks

  4. My boot image is not able to trigger the command prestart.cmd automatically. If i got to my client machine and map the drive and run the command manually everything works fine.

    Any help is much appreciated.

    Thanks

  5. This works perfectly for me if I use the F12 PXE boot method….is there a way of making this work if I deploy an “online” OSD from the Software Center? I’ve tried it from there and the DaRT part then doesnt work (no prestart to load it..).

  6. I’m trying to make the name of the file be the Dell Service Tag instead of the IP address..
    I added this into the .swf file:
    ‘ Obtain Serial Number
    strComputer = “.”
    Set objWMIService = GetObject(“winmgmts:” & “{impersonationLevel=impersonate}!\\” & strComputer & “\root\cimv2”)
    Set colSMBIOS = objWMIService.ExecQuery(“Select * from Win32_BIOS”)
    For Each objSMBIOS in colSMBIOS
    strSerialNum = objSMBIOS.SerialNumber
    Next

    ‘ Set Computer Name
    strComputerName = strSerialNum

    Then later in the script changed
    sShortcutName = oEnvironment.Item(“DartIP001”)
    to
    sShortcutName = oEnvironment.Item(“strComputerName”)

    However, I’m just getting blank names for the shortcut.
    Any ideas how to modify the script to use Serial Number instead of IP Address?

    Thanks

  7. Hey, Thanks… I got it all working, and was able to edit it to use the Computer’s Serial Number instead of the IP Address when it creates the shortcut. This is very helpful.

  8. Hi,

    we have the problem that RemoteRecovery doesn’t create the inv32.xml file. The script doesn’t find the file every time. However, Remote Recovery is running and we are able to start Remote Control. Do you have any suggestions?

  9. Hey Gary

    Out of interest, where did you put the code to grab the serial number? I’m trying to do the same and I keep getting nothing returned. However if I run the code on it’s own it works fine.

    Cheers
    Simon

  10. Is there a way we can change the shortcut name from IP to OSDComputerName? If so were do I change that in the script?

  11. When I trty to create the media it always says that the DISM needs to be in current version, but it is. Any ideas?

Leave a Reply