Chris Stauffer at myITForum.com

You want me to do What?

Syndication

News

Links to blogs i like

Links

ConfigMgr 2007 OSD/MDT error 0x80004005 caused by c:\bootmgr

Problem:

I ran across this problem on all of our machines that were images with MDT/BDD. For some reason the c:\bootmgr file was left behind after the machine was imaged. We are now moving forward and hope to have a fully functioning ConfigMgr with OSD/MDT, so any machine that was previously imaged with MDT needs fixed before the new image will install.

 

FYI: It is my understanding that this problem can also occur if there is a boot folder in the root of C:\ but i did not have that issue so i did not make this solution for it but if you have that problem just alter this script to delete that directory as well. It would be c:\boot

 

Solution:

With the help of several guys on the Myitforum scripting list I create a script that will look for the c:\bootmgr file and delete it as a task in the TS. (To the guys that assisted me if you want credit just let me know and I will add your name)

Create a file in your MDT 2008 package called ZTI_Detect_BootMgr.vbs and copy the script text at the bottom of this post and past it in the file.

Save the file and update your DP’s

 

Next we setup the tasks. They should be place here:

image

 

Then add a new group and call it “Remove BootMgr File”

Click options and add this

 

image

This will make the group only apply to systems that are being imaged via an advertisement.

If you are running the TS from a disk or thumb drive you should not have the issue because the first thing that your TS should do to the drive is format it.

 

Add a task called “run command line”

Enter this command line in the command line field:

 

cscript.exe "%deployroot%\scripts\ZTI_Detect_bootmgr.wsf"

Finish building your TS.

 

Script:

 

Here is the script

<job id="ZeroTouchInstallation">
   <script language="VBScript" src="ZTIUtility.vbs"/>
   <script language="VBScript">
 
'//////////////////////////////////////////////////
'//
'// Script File:
'//
'//   ZTI_Detect_BootMgr.vbs
'//
'//   This script checks for the BootMgr file on the root of c and deletes if present
'//
'//   Author: Christopher Stauffer
'//   
'//   URL: http://myitforum.com/cs2/blogs/cstauffer/default.aspx
'//   
'//   Disclaimer
'//   This script is provided "AS IS" without express 
'//   or implied warranty of any kind.
'//
'//  Version 1.0 Created Script
'//  Version 1.1 Removed stuff that wasn't needed
'//  Version 1.2 Added start and stop checks and error checks
'//
'//////////////////////////////////////////////////
 
 
 
 ' Find File BootMgr
 On error resume next
 Err.clear
 
 ' Log Start of script
 oLogging.CreateEntry "BootMGR Check started", LogTypeInfo
 
 If oFSO.FileExists(oEnvironment.Item("DeploySystemDrive") & "\BootMgr") then
 
  sBMG = oEnvironment.Item("DeploySystemDrive") & "\BootMgr"
  oLogging.CreateEntry "Found BootMgr in " & sBMG, LogTypeInfo
  oFSO.DeleteFile sBMG, True
  
    if err.number <> 0 Then
                oLogging.CreateEntry "Error deleting file: " & sBMG & " - Error:" & err.Description, LogTypeInfo
    else
        oLogging.CreateEntry "Deleted file in " & sBMG, LogTypeInfo
    End if
 
 Else
 
  oLogging.CreateEntry "Could not locate BootMgr", LogTypeInfo
    
    ' Log end of script
    oLogging.CreateEntry "BootMGR Check ended", LogTypeInfo
 
  WScript.Quit
 
 End If
 
 'reset error checking
  On error goto 0
 
 
 ' Log end of script
 oLogging.CreateEntry "BootMGR Check ended", LogTypeInfo
 
WScript.Quit
 
</script>
</job>
 
Published Tuesday, April 21, 2009 3:29 PM by cstauffer

Comments

# re: ConfigMgr 2007 OSD/MDT error 0x80004005 caused by c:\bootmgr@ Tuesday, April 21, 2009 5:20 PM

Just never run the script on a Windows Vista machine as it will no longer boot.

# re: ConfigMgr 2007 OSD/MDT error 0x80004005 caused by c:\bootmgr@ Tuesday, April 21, 2009 7:10 PM

Sorry forgot to add that. Yes this was only written for an XP Deployment.