@BDiddY, I made this account just to reply here.
I don’t mean to sound rude, but it would be very much appreciated in the future if you explain what exactly you changed instead of just saying “I edit Hiren’s boot process inside the boot.wim file and map the Y: drive to a network share after winpe initialize but before Hiren process initializes.” when describing the fix. This is extremely vague and doesn’t offer any help to users who are trying to find the solution. I gave myself a headache trying to figure out what exactly was changed that fixed it for you based on your comment. I ended up finding it with grep, so I’m posting it here:
The Y:\ drive is indeed on the root of the CD image and does not get loaded into PXE since you’re effectively skipping over that and booting directly to the WIM in a subfolder. You need to have the directories and files that are traditionally mounted into Y:\ (which are Programs,CustomDrivers,HBCD_PE.ini) placed somewhere else accessible to the image. An actual example solution to this issue is to:
- Mount the WIM with DISM
- Open the file “windows\system32\pecmd.ini”
- Under the section _SUB_PreShell at ~line 36, add a line just after the first line in this section (that contains
EXEC @!%WinDir%\System32\winpeshl.exe
) containing a command that mounts Y:\ to a path accessible to the image. If you do not do this, Y:\ will not be mounted and everything else in this initialization script will fail silently. - Commit your changes and copy the new boot.wim to the PXE path you’re defining for Hiren.
In my preferred method, I chose to simply make a folder inside the root of the boot.wim titled “Y_drive”, copied Programs,CustomDrivers, and HBCD_PE.ini into it, and added the following line to that section:
_SUB PreShell
EXEC @!%WinDir%\System32\winpeshl.exe
EXEC =@!%WinDir%\System32\subst.exe y: X:\Y_drive // NEW COMMAND
This would just create a Y:\ mount that points to a local directory inside X:\ . I did not want to host these files on a network share since I had no intention of changing the contents of Hiren’s included programs or startup items. I just wanted the thing to work. This will add roughly 1GB to the .wim size, just be warned. If you wish to use a network share as BDiddY described, then simply substitute the command for another method of using SMB, eg. net use
with your network share path, and credentials if needed.
Using a simple folder substitute as I described above fixed the programs being missing after booting from PXE since they are now included in the WIM image being loaded. I also commented out the line that triggers startup.mp3
to play (in the same file at line ~346) because it’s an obnoxiously loud sound that turns my teams’ heads every time I use this tool.
I hope this prevents the same frustration for new users that I went through for this since I know almost nothing about WinPE processes or specific Hiren’s startup workflow.