This is a whole new script that is meant to enable the boot configuration for WinRE. This is being used because the existing WinRE script wasn't working quite right in locating the proper volume.

' This will enable boot configuration for WinRE
Set oWMI = GetObject("winmgmts://./root/cimv2")
Set oFSO = CreateObject("Scripting.FileSystemObject")
Set wshShell = CreateObject("WScript.Shell")
Set oLog = oFSO.CreateTextFile("C:\SCWinRE.log")

'Determine the letter assigned to the Windows RE tools volume
oLog.WriteLine "Looking for Windows RE tools volume"
Set oVols = oWMI.ExecQuery("Select * from Win32_Volume where Label='Windows RE tools'")
oLtr = ""
For Each oVol in oVols
    oLtr = oVol.DriveLetter
oLog.WriteLine "Search completed."
if oLtr = "" Then WScript.Quit  'No recovery volume found
oLog.WriteLine "Found on drive " & oLtr

'Determine the location of our tools
oLog.WriteLine "Looking for drives with BCDBoot.exe file"
Set oVols = oWMI.ExecQuery("Select * from Win32_Volume where DriveLetter like '%:'")
For Each oVol in oVols
    sPath = oVol.DriveLetter & "\Deploy\Tols\X64\BCDBoot.exe"
    If oFSO.FileExists(sPath) Then Exit For
    sPath = ""
oLog.WriteLine "Search completed."
If sPath = "" Then WScript.Quit 'Couldn't find the BCD tool

oLog.WriteLine "Found at " & sPath

'Execute the BCDBoot tool to apply a boot database
sCmd = sPath & " C:\Windows /l en-us /s " & oLtr & " /f UEFI"
oLog.WriteLine "Attempting to execute the following: " & vbCrLf & sCmd
wshShell.Run sCmd, 0, True
oLog.WriteLine "Completed."