I'm trying to create a script to deploy a Windows 7 image en mass, and although it works there is one thing about it that's annoying me and I'm hoping there is a fix. I am trying to setup a second recovery partition with the Windows RE image as well as the initial system image. My deployment script and diskpart scripts (see attached) work as they are supposed to, but I'm wondering if there is any way to setup the recovery partition without having a mount point (ie I don't want it to show up as a drive letter).
Is there anyway using reagentc to set the setREimage and setOSimage image paths using disk\partition information instead of a drive letter? If not, is there a different utility I should be using to achieve what I'm trying to do? Thanks!
SELECT DISK 0
CREATE PARTITION PRIMARY SIZE=7000 ID=27
FORMAT QUICK FS=NTFS LABEL="Recovery"
CREATE PARTITION PRIMARY
FORMAT QUICK FS=NTFS LABEL="Win7_OS"
ECHO ===== Specify Source Drive and WIM File =====
IF /I "'%DISK%'"=="''" (
SET /P DISK=Diskpart Config File:
ECHO Diskpart Config File: %DISK%
IF /I "'%WIM%'"=="''" (
SET /P WIM=Full Path to Source WIM:
ECHO Source WIM: %WIM%
ECHO Source: %WIM%
ECHO Continuing this program will DESTROY ALL DATA on the drive specified in the
ECHO above disk partitioning script above and then deploy the WIM image specified.
ECHO If the above information is not accurate, or you wish to abort press Ctrl + C
ECHO Beginning Disk Partitioning...
diskpart /s %DISK%
ECHO Applying WIM image...
imagex /apply %WIM% 1 c:
ECHO Modifying BCD...
ECHO Creating Recovery Partition...
copy C:\Windows\System32\Recovery\winre.wim D:\Recovery\WindowsRE\
copy %WIM% D:\Recovery\WindowsRE\install.wim
ECHO Adding Recovery Options to F8 Menu...
C:\Windows\System32\reagentc /setREimage /path D:\Recovery\WindowsRE /target C:\Windows
C:\Windows\System32\reagentc /setOSimage /path D:\Recovery\WindowsRE /target C:\Windows