Fixed PXEMedia creation "BCD Creation" ERROR

Fixed PXEMedia creation "BCD Creation" ERROR

Hello ME Community,

I have found a solution to an issue with BCD Creation during "creating bootable media"

The problem exists within the BCDCreationPXE.CMD batch file located at %DesktopCentral_Server%\bin. 

Specifically in section :PXEBCDCreation

The script never specifies the VOL or directory" for the CMD session. 

If your CMD session opens to S:the batch file will fail to find/recognize "BCDedit" ( start of the batch command)

Here is the original code:

:PXEBCDCreation
if exist "%BCD_OUT_DIR%\BCD" del "%BCD_OUT_DIR%\BCD"
if errorlevel 1 goto PXEBCDDeleteError
bcdedit -createstore "%BCD_OUT_DIR%\BCD"--------------------this is where the error happens
if errorlevel 1 goto PXEBCDCreationError
bcdedit -store "%BCD_OUT_DIR%\BCD" -create {ramdiskoptions} /d "Ramdisk Options"
if errorlevel 1 goto PXEBCDCreationError
bcdedit -store "%BCD_OUT_DIR%\BCD" -set {ramdiskoptions} ramdisksdidevice boot
if errorlevel 1 goto PXEBCDCreationError
if %WINDOWSIZE_OPTIONS_ENABLED% == 1 (
    bcdedit -store "%BCD_OUT_DIR%\BCD" -set {ramdiskoptions} ramdisktftpblocksize 1456
    if errorlevel 1 goto PXEBCDCreationError
    bcdedit -store "%BCD_OUT_DIR%\BCD" -set {ramdiskoptions} ramdisktftpwindowsize 16
    if errorlevel 1 goto PXEBCDCreationError
    )


I updated the code to the following and it is working correctly:

:PXEBCDCreation
if exist "%BCD_OUT_DIR%\BCD" del "%BCD_OUT_DIR%\BCD"
        if errorlevel 1 goto PXEBCDDeleteError
C:
CD C:\Windows\System32
bcdedit -createstore "%BCD_OUT_DIR%\BCD"
if errorlevel 1 goto PXEBCDCreationError
bcdedit -store "%BCD_OUT_DIR%\BCD" -create {ramdiskoptions} /d "Ramdisk Options"
if errorlevel 1 goto PXEBCDCreationError
bcdedit -store "%BCD_OUT_DIR%\BCD" -set {ramdiskoptions} ramdisksdidevice boot
if errorlevel 1 goto PXEBCDCreationError
if %WINDOWSIZE_OPTIONS_ENABLED% == 1 (
    bcdedit -store "%BCD_OUT_DIR%\BCD" -set {ramdiskoptions} ramdisktftpblocksize 1456
    if errorlevel 1 goto PXEBCDCreationError
    bcdedit -store "%BCD_OUT_DIR%\BCD" -set {ramdiskoptions} ramdisktftpwindowsize 16
    if errorlevel 1 goto PXEBCDCreationError
)

After this change was made we were able to create and deploy images.


Please note: You may also have to set the "%BCD_OUT_DIR%" Environment Variable. 

Thank you, 


                New to ADManager Plus?

                  New to ADSelfService Plus?