Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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?

share

locked by HopelessN00b Dec 5 at 8:30

This question exists because it has historical significance, but it is not considered a good, on-topic question for this site, so please do not use it as evidence that you can ask similar questions here. This question and its answers are frozen and cannot be changed. More info: help center.

3 Answers 3

up vote 2 down vote accepted

Have a look at GImageX. http://www.autoitscript.com/gimagex/

share
    
Thanks! Unfortunately no source code. But a COM-object with an easy apply-function and progress callback. Looks great, I'll try it –  Christian May 11 '09 at 22:55

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):

  1. Inject new drivers
  2. Change the HAL
  3. Input a PC name and join the machine to a domain.
  4. Change the timezone and language details
  5. Change the local admin password
  6. Running Windows update (including running it against your own WSUS server)
  7. Install additional programs.

MDT 2008 can also:

  1. Inject new mass storage drivers
  2. Automate imagex build and captures
  3. Change customise deployments based on data inputted into database.
  4. Customise WinPE images
  5. Tons more that I'll get to listing.
share
    
Thanks, looks great! But I have solved many problems myself already (integration in Linux dns/dhcp/tftp-servers, database with computers, utility to join domain, set admin pw and rename computer). Unfortunately I could not find a wrapper for imagex, the script Microsoft Deployment Toolkit\Templates\Distribution\Scripts\LTIApply.wsf just executes imagex.exe. Were is that wrapper? The ability to inject drivers and mass storage drivers OFFLINE into XP (not Vista!) would of course be great, but a topic of its own. –  Christian May 11 '09 at 22:52
1  
MDT 2008 uses a concept called 'Task Sequences' to execute imagex. You can create a 'Task Sequence' in the MDT console. MDT will then generate a unique WinPE image which runs your desired 'task sequence'. The Task Seqence and the WinPE enviromment is very customiseable as you can remove all the functionality you don't need and add in all your custom scripts that you do need. Plus you get a nice loooking non-interactive progress bar with the custom background of your choice. –  Dale Nicholls May 12 '09 at 0:38

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:

code.msdn.microsoft.com/InstallWindowsImage

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:

msdn.microsoft.com/en-us/library/dd834950.aspx

share

Not the answer you're looking for? Browse other questions tagged or ask your own question.