It seems to fail when run through IA with no indication of why in the logs. I'm wondering if it's something to do with the UAC elevation? If I type the command manually in to CMD it works just fine.
The command works fine on Windows 7 and Server 2008 through IA (without the NetFx4Extended-ASPNET45 feature).
That's exactly what I thought... I've tried Run Program and Run Program as to set a working directory.
As I said it works with Server 2008 and 7, but not Server 2012.
I'm using it to enable IIS and ASP.NET before the install begins.
I even tried creating a Batch File with Write Text To File but it still doesn't work when I run that. After the installation I can run the batch file and it works fine. This is why I think it might be something to do with UAC elevation, but I'm only guessing.
if Variable OS64 Equals TRUE
Comment: Set the Windows paths to x64
Set x64 - Native 64 bit Windows, AMD64 and EM64T Architectures - installation mode
end
----- DISM COMMANDS HERE -----
if Variable OS64 Equals TRUE
Comment: Set the Windows paths to x86
Set Win32 - Native 32 bit Windows and Windows 32 on Windows 64 (WOW64) - installation mode
end