I mounted a .wim file I had been working on which contained some imaging software:
imagex /mountrw c:\boot\winpe.wim 2 c:\image
This makes it available in the "image" folder.
I then went and edited a bat script on the image. Once the changse to the script inside the wim file had been completed I went to unmount the image and commit the changes using the following command:
imagex /unmount /commit c:\image
However I received the following error:
Unmount error: Changes to the Image could not be commited.
The data is invalid.
After I remounted the image, I checked, the changes stuck. This error is bogus, it is saying the data didn't commit when it did. Maybe this is because I never added any new files, I only modified an existing one?
Anyway if you see this error, just ensure you check the file - ensure your changes stuck and ignore the error in future.