DESKTOP

Windows Vista : Managing Windows Images - Developing Custom Solutions

10/24/2012 1:19:11 AM
What constitutes development can vary greatly depending upon who you talk to. You could say you developed an image at this point, so how about developing an automated way to handle some of the more repetitive tasks of building a Windows PE image? We saw some solutions that aim to help you do this, but many are keen to do it themselves. You can do just about anything from a simple batch file to leveraging the Windows Imaging API (Wimgapi.dll) directly, both of which are briefly covered in the following sections.

1. Leveraging scripts for automation

A script can be a series of command lines in a batch file or something more. For example, to have a script mount an image, import any packages, and then unmount the image, you need only to create a batch file containing each of the required commands:

imagex /mountrw c:\winpe_x86\winpe.wim 1 c:\winpe_x86\mount
PeImg /Import=c:\updates\*.cab c:\winpe_x86\mount
PeImg /Install=*KB* c:\winpe_x86\mount
Imagex /Unmount /Commit c:\winpe_x86\mount

You can also write a script to act on input from the user. Typically user input is provided to a script by a simple text menu or via command line arguments. However, today there are tools to let you go far beyond this. One of the features of the Admin Script Editor provides a GUI editor (see Figure 1) for creating windows forms for PowerShell (natively using the .NET Framework) or for VBScript and KiXtart (using the freeware KiXforms COM component).

NOTE

Admin Script Editor is a suite of scripting tools designed to help create, manage, and distribute scripts. A trial of this application may be found on the included CD and online at www.adminscripteditor.com.

Figure 1. Creating a script with a graphical interface

2. Developing solutions with SmartDeploy Imaging Component

The SmartDeploy Imaging Component (AKA SmartWIM) from SmartDeploy provides a documented ActiveX control to allow for the incorporation of WIM format support into your applications or scripts.

Capture and apply disk volumes directly from script, get information about images through a Web page, or provide a state-of-the-art user interface complete with progress bar. SmartWIM eliminates the need to wrap command line tools or learn Microsoft's provided APIs by offering a straightforward, fully documented ActiveX control (see Figure 2). Some of the functions and features include:

  • Capture and apply images using VBScript, Visual Basic, VB.NET, C#

  • Create delta files that contain only the differences between images

  • Real-time imaging status with percent complete and estimated time remaining

  • Single fully self-contained COM object and ActiveX control written with ATL 3.0

  • Small footprint (~300KB)

  • Requires no MFC DLLs or runtime libraries

  • Works on Windows 2000, XP, 2003, Vista, and Windows PE 2.0

Figure 2. Understanding the architecture of SmartWIM

Which is the better tool is a matter of opinion, but keep in mind that the new (and free) GImageX v2 provides a COM interface for scripting as well.

NOTE

It is possible to utilize the APIs provided by Microsoft directly, although it is more challenging.
Other  
 
Most View
Belkin AC1200 DB Wi-Fi ADSL Router
Ditch Your Laptop For Your Phone (Part 1)
Installing and Configuring SharePoint 2013 : Creating the Farm (part 1)
Using Services for UNIX to Integrate UNIX Systems with an Active Directory/Exchange Server 2007 Environment
Apple - Celebrating 7 Years Of Success
ASP.NET 4 : Error Handling, Logging, and Tracing - Handling Exceptions
Security Pros Get Caught Out By QR Codes
Samsung ATIV Tab Review - A Wonderful Windows RT Tablet (Part 2)
How To Extend Life For Mac (Part 1)
Edifier E10 Exclaim - Exclamation Mark
Top 10
Sharepoint 2013 : Developing Applications Using Office Services - What’s New in Access Services
Sharepoint 2013 : Developing Applications Using Office Services - The New Machine Translation Services
Sharepoint 2013 : Developing Applications Using Office Services - Word Automation Services and the New PowerPoint Automation Services
Sharepoint 2013 : Developing Applications Using Office Services - What’s New in Excel Services
Sharepoint 2013 : Developing Applications Using Office Services - WOPI and the New Office Web Apps Server
Sharepoint 2013 : Building a BCS-enabled Business Solution : Building an Integrated BCS Solution with an App for SharePoint Containing an App for Office
Business Connectivity Services in Apps for SharePoint 2013 : Building an App-level BCS Solution for Office 365 SharePoint Online
Business Connectivity Services in SharePoint 2013 : Adding a Business Data Connectivity Model to Office 365 SharePoint Online
Remote Event Receivers in Sharepoint 2013 : Introducing Remote Event Receivers
Windows Server 2008 and Windows Vista : Common GPO Troubleshooting Tools (part 3) - GPResult, GPOTool