Some code may be unnecessary and some further clean-up of the script would be good - but it works and this is the most important fact from my point of view.
It uses the BartPE plugin that can be downloaded from Acronis after registering.
Download and install the BartPE plugin and afterwards extract the WinPE.zip to a temporary directory. Select that path in the GUI of the script.
Tested with Win7PE_SE_20120416 on a Win7PE with Win7 32bit SP0 CD as source.