Ok so i've set this up in a script maybe you can port it over.
Keys are based on generic ones:
http://heidoc.net/joomla/technology-science/microsoft/70-windows-8-direct-download-links
Locales are found here:
http://technet.microsoft.com/en-us/library/cc766503%28v=ws.10%29.aspx
Code:
Rem "WMC & .NET 3.5 (include .NET 2.0 and 3.0) Enabler"
Rem "Make Sure Running As Administrator"
Pause
@echo off
Rem "Clearing Existing Directories and Recreating"
"D:\W8.1Tools\Dism\Dism.exe" /Cleanup-Mountpoints
DEL /F /Q "D:\Win81\*.*"
RD /S /Q "D:\Win81"
MKDIR "D:\Win81\"
MKDIR "D:\Win81\Iso"
MKDIR "D:\Win81\Mount"
MKDIR "D:\Win81\Wim"
Rem "Extracting Windows Iso & Moving Files"
"D:\W8.1Tools\7z" x -y -oD:\Win81\Iso "I:\ISOs\Os\Windows_8.1_EN-US_x64.iso
Move "D:\Win81\Iso\sources\install.wim" "D:\Win81\Wim\"
Rem "Mounting Image"
"D:\W8.1Tools\Dism\Dism.exe" /mount-wim /wimfile:D:\Win81\wim\install.wim /index:1 /mountdir:D:\Win81\mount
Rem "Image Mounted"
Rem "Enabling .NET 3.5 (include .NET 2.0 and 3.0)"
"D:\W8.1Tools\Dism\Dism.exe" /image:D:\Win81\mount /Enable-Feature /FeatureName:NetFx3 /All /Source:D:\Win81\Iso\sources\sxs /LimitAccess
Rem "Enabled .NET 3.5 (include .NET 2.0 and 3.0)"
Rem "Setting Up Windows"
"D:\W8.1Tools\Dism\Dism.exe" /Image:D:\Win81\mount /Get-TargetEditions
"D:\W8.1Tools\Dism\Dism.exe" /Image:D:\Win81\mount /Set-Edition:ProfessionalWMC /
"D:\W8.1Tools\Dism\Dism.exe" /Image:D:\Win81\mount /Set-ProductKey:GBFNG-2X3TC-8R27F-RMKYB-JK7QT
"D:\W8.1Tools\Dism\Dism.exe" /Image:D:\Win81\mount /Set-UILang:en-NZ
"D:\W8.1Tools\Dism\Dism.exe" /Image:D:\Win81\mount /Set-UILangFallback:en-US
"D:\W8.1Tools\Dism\Dism.exe" /Image:D:\Win81\mount /Set-Syslocale:en-NZ
"D:\W8.1Tools\Dism\Dism.exe" /Image:D:\Win81\mount /Set-UserLocale:en-NZ
"D:\W8.1Tools\Dism\Dism.exe" /Image:D:\Win81\mount /Set-InputLocale:1409:00000409
"D:\W8.1Tools\Dism\Dism.exe" /Image:D:\Win81\mount /Set-TimeZone:"New Zealand Standard Time"
Rem "Commiting, Saving And Unmounting Image"
"D:\W8.1Tools\Dism\Dism.exe" /unmount-wim /mountdir:D:\Win81\mount /commit
"D:\W8.1Tools\imagex.exe" /flags "ProfessionalWMC" /info D:\Win81\wim\install.wim 1 "Windows 8.1 Pro with Media Center" "Windows 8.1 Pro with Media Center"
"D:\W8.1Tools\Dism\Dism.exe" /Export-Image /SourceImageFile:D:\Win81\wim\install.wim /SourceIndex:1 /DestinationImageFile:D:\Win81\iso\sources\install.wim /compress:maximum
xcopy /s /h /y /k /g /c "D:\W8.1Tools\Ei.cfg" "D:\Win81\Iso\sources\"
Rem "Building Iso..."
"D:\W8.1Tools\oscdimg.exe" -bD:\Win81\iso\boot\etfsboot.com -h -u2 -m -lWin81-PRO-WMC D:\Win81\iso "D:\Win81\Windows 8.1 Pro Wmc.iso"
Pause