I currently use this simple batch-file to deploy an image to our workstations:
ECHO HALLO
y:
cd \
diskpart /s diskpartcmds.txt
imagex.exe /apply y:\image.wim 1 c:
bootsect /nt52 c:
(Y: is a mounted network share, dispkatcmds.txt is
select disk 0
clean
create partition primary
select partition 1
active
format quick
assign letter=c
exit
)
This works absolutely well, it runs in a console window after WinPE booted via PXE and shows progress. I would only like to have a nice GUI (just showing tasks and progress, no interaction!) that is shown instead of the console while the image is deployed with a progress bar.
Does someone have something already? Is there a complete .NET wrapper (I can use mono installed on Y:!) for ImageX?
Unfortunately there is only one article to be found about imagex.dll http://www.codeproject.com/KB/vista/wimgapi.aspx
Sorry for posting such a selfish lazy question about something purely cosmetic that I would probably be able to write if I had a lot of time), but I can try and maybe someone learns from this question about imagex?
The Microsoft Deployment Toolkit 2008 Update 1 does all this and more. And it's free too! MDT 2008 will also solve a number other problems you might have.
MDT 2008 includes a mmc console, a customised WinPE build environment and many very useful scripts. From it's 'imagex' wrapper gui it can (via lite touch or zero touch, smb share, pxeboot or media):
MDT 2008 can also:
Have a look at GImageX. http://www.autoitscript.com/gimagex/
There's a PowerShell script on MSDN whose source has examples of how to call into WIMGAPI APIs from C# or any other .NET language:
Perhaps that might be a useful example to you? (This particular script embeds C# code in it, loads the code using the PowerShell built-in Add-Path, and then calls into the C# code from the native PowerShell scripting.)
If you're looking for more of a function-by-function reference, MSDN does have official details about the publicly exposed APIs in wimgapi.dll: