Two Windows 7's in Boot Manager after ImageX wim imaging

For some reason I get two Windows 7 options in the Windows Boot Manager after I clean in Diskpart and apply a .wim to the C-Drive and make bootable and reboot.
I'm imaging Dell laptop's that already had Windows 7 on them.

My script first runs diskpart:
SELECT DISK 0 
CLEAN
Create partition primary size=220373
SELECT PARTITION 1 
format quick fs=ntfs label="Windows 7"
ACTIVE 
ASSIGN letter=C
EXIT

Open in new window


It then simply applies the image:
net use T: \\WDSServer.Domain.com\c$\images /user:me@mydomain.com
g:\Imagex /apply T:\win7.wim 1 c:\
c:\windows\system32\bcdboot c:\windows /l en-us

Open in new window



Then I reboot and have to choose the first "Windows 7" option in the Windows Boot Manager to proceed with loading Windows 7.

Any way to fix this so I don't have to manually remove the 2nd entry within Windows?
garryshapeAsked:
Who is Participating?
 
dumpsterdivingdaveCommented:
How was the WIM captured/created?  Was it done from another computer or this computer?

It looks like when the WIM was captured, the BCD entry from imagex was also captured.  What you could try doing is mount the WIM file using imagex /mountrw image.wim 1 C:\Mountpoint and load the BCD file and see if that duplicate entry is also present there.  If so, delete it, and then use imagex /unmount C:\Mountpoint /commit.
0
 
dumpsterdivingdaveCommented:
Can you post a copy of the BCD showing the two entries?
0
 
garryshapeAuthor Commented:

Windows Boot Manager
--------------------
identifier              {9dea862c-5cdd-4e70-acc1-f32b344d4795}
device                  partition=C:
description             Windows Boot Manager
locale                  en-US
inherit                 {7ea2e1ac-2e61-4728-aaa3-896d9d0a9f0e}
default                 {4778351e-863e-11e0-9db5-0025646233b0}
resumeobject            {4778351d-863e-11e0-9db5-0025646233b0}
displayorder            {4778351e-863e-11e0-9db5-0025646233b0}
                        {4778351a-863e-11e0-9db5-0025646233b0}
toolsdisplayorder       {b2721d73-1db4-4c62-bf78-c548a880142d}
timeout                 30

Windows Boot Loader
-------------------
identifier              {4778351e-863e-11e0-9db5-0025646233b0}
device                  partition=C:
path                    \windows\system32\winload.exe
description             Windows 7
locale                  en-US
inherit                 {6efb52bf-1766-41db-a6b3-0ee5eff72bd7}
recoverysequence        {4778351f-863e-11e0-9db5-0025646233b0}
recoveryenabled         Yes
osdevice                partition=C:
systemroot              \windows
resumeobject            {4778351d-863e-11e0-9db5-0025646233b0}
nx                      OptIn

Windows Boot Loader
-------------------
identifier              {4778351a-863e-11e0-9db5-0025646233b0}
device                  locate=custom:12000002
path                    \Windows\system32\winload.exe
description             Windows 7
locale                  en-US
inherit                 {6efb52bf-1766-41db-a6b3-0ee5eff72bd7}
recoveryenabled         No
osdevice                locate=custom:22000002
systemroot              \Windows
resumeobject            {47783519-863e-11e0-9db5-0025646233b0}
nx                      OptIn
0
Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

 
garryshapeAuthor Commented:
Yeah that must be it. Duplicate existing in the system that was imaged. I'm not sure what image that was. I think after fixing it and then re-capturing it we should be good.

Thanks!
0
 
garryshapeAuthor Commented:
Well I'm not sure why but I'm still getting two "Windows 7" entries on Boot Manager when I boot up.
I fixed this issue in MSConfig under Boot by deleting the entry .

1st says "Windows 7 (C:\windows) : Current OS; Default OS
2nd says "Windows 7 (\Windows)"

I had deleted 2nd entry and then ran sysprep and captured image to .wim file accordingly. Then I ran diskpart on the same laptop and cleared all and re-created, then applied the .wim I just saved, and sure enough upon booting up, 2 Windows 7 entries... :(
0
 
dumpsterdivingdaveCommented:
it sounds like it is creating a sysprep partition to boot from to capture the image, but is also capturing that partition as well (which it shouldn't).

If you use imagex to mount the wim on a host computer (just mount, not deploy) and then edit the boot file and commit the changes, you should be able to then push the image and only have one entry in the BCD.
0
 
garryshapeAuthor Commented:
Ah ok, well I'm not sure how to edit the boot file.
I searched the mount point directory for a .bcd file but didn't find one.
It's an actual file, right? I cannot figure out its name.extension
0
 
dumpsterdivingdaveCommented:
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.