Making “PostReflect.exe” functional

Vista Service Pack 1 is here, and with it a few new tricks that need to be learned.  The first shocker for me is that you cannot apply Vista SP1 to an offline image… bummer!  I had understood from earlier MS brags about Vista that the "componentized" (sic) OS could always be maintained offline.  Adding insult to injury, you cannot slipstream SP1 into RTM source media, as was possible with XP and Server 2003.  Oh well…

The new Windows AIK v1.1 which supports Vista SP1 states that you must run the "postreflect.exe" tool on any offline Vista SP1 image before you attempt to apply that image to new hardware.  Why?  I don’t know… they have some mumbo jumbo about critical driver availability which is hard to grok.  The problem for me was that PostReflect failed to work! 

Here is what I did:

  1. Applied Vista SP1 to a fresh Vista Enterprise install
  2. Ran sysprep on the system, then used imagex from a WinPE instance to capture the image
  3. transferred the image to our distribution server (which has Microsoft Deployment 4 and the new AIK installed).
  4. Used imagex to mount the image in read/write mode
  5. Ran "vsp1cln.exe" from the AIK to remove the SP1 uninstall information.
  6. Ran "postreflect e:mountwindows c:" to "reflect" the critical device drivers in the offline image mounted at "e:mount", which uses the system drive letter "c:" when running.  This returned a "FAILED" error, with return code "0x0000007E".

What the heck?

Since SP1 and postreflect are brand new, Google and the Microsoft news groups were of no help in debugging the problem.  The godlike Mark Russinovich was.  I started "procmon.exe" with a filter for "postreflect.exe", then ran the prostreflect operation again.  As usual, I captured a ton of activity, but it not take too much examination to see that postreflect was looking for the AIK 1.0 DLL "drvstore.dll", but was unable to find it.  As a quick fix, I did a "cd" to "C:Program FilesWindows AIKToolsx86Servicing6.0.6000.16386_x86" (where one copy of drvstore.dll is located).  I then re-ran postreflect, and the operation now completes successfully!

As a long-term fix, I copied the contents of "C:Program FilesWindows AIKToolsx86Servicing6.0.6000.16386_x86" to a directory "C:Program FilesWindows Imaging", then laid the contents of "C:Program FilesWindows AIKToolsx86Servicing" and "C:Program FilesWindows AIKToolsx86" on top of that.  My "Windows Imaging" folder was already in my system "PATH" environment variable as a fix for a similar problem we had with "wdsutil" in the past.  "postrefect" now should be able to locate all of the files that it needs for future operations.  However, I will need to keep an eye out of future AIK tool updates… those files will need to be copied to my "Windows Imaging" folder.

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s