This turned out to not be so hard. I just made a batch file alongside folder called "patch" that contains all the files to be replaced or added. The batch script does the following:
- Sets up a PE build environment (copype)
- Mounts the resulting WIM image (dism)
- Adds the WMI and NetFX WinPE packages (dism)
- Adds ImageX to the image for AbiatharOS installation (copy)
- Sets the NTFS owner of WinPE's System32 directory to Administrators (takeown)
- Grants the user the rights to modify the WinPE system files (icacls)
- Adds/replaces the appropriate files from the patch directory (xcopy)
- Unmounts the WIM image (dism)
- Burns the WIM and other resources into an ISO (oscdimg)
- Moves the WIM file out of the PE build environment (move)
- Removes the PE build environment (rmdir)
I should test it on other computers before release, but it works perfectly on mine. All I have to do is release a ZIP containing compile.bat and the patch directory; all the real assembly happens on consumer machines.
No comments:
Post a Comment