Monday, April 26, 2010

Windows 7 wim and sysprep failing with error hr = 0x8007139f

Don't you love Microsoft's error codes? Most of the time they are so cryptic that you just want to delete whole day's work and abandon the idea of implementing imagex and wim imaging.
Spent a few hours creating Windows 7 Pro wim image with all the apps and settings, sysprep-ed after each major installation and all was well. Until Kaspersky Antivirus v6 MP4 came along. Once Kaspersky was installed I sysprep-ed for the last time, or so i thought, restarted to test it before capturing and uploading the wim image to the WDS server (W2k3R2) and system started complaining that it can not load something and needs to restart on n's time. Lucky me.
So I just used PXE to boot to WDS and install previous wim image on the 2nd partition and from there start digging for the d:\windows\Panther for errors and setup logs. Setuperr.log in the d:\windows\panther\unattendGC\ folder presented "self-explanatory" error:

2010-04-26 19:07:12, Error [windeploy.exe] Failure occured during online installation. Online installation cannot complete at this time.; hr = 0x8007139f
2010-04-26 19:36:29, Error [windeploy.exe] Failure occured during online installation. Online installation cannot complete at this time.; hr = 0x8007139f
2010-04-26 20:03:38, Error [windeploy.exe] Failure occured during online installation. Online installation cannot complete at this time.; hr = 0x8007139f


After some google-ing or bing-ing :) ended up at the following website http://www.myitforum.com/absolutenm/templates/Articles.aspx?articleid=14478&zoneid=98
and as i suspected Kaspersky Antivirus v6 MP4 was the culprit. Changed the reg key, unloaded the hive, restarted and Windows 7 finished installing all the devices and drivers.

  1. Mount the wim image of the master (imagex /mountrw path_of_the_wim 1 C:\WIM)
  2. Open the System hive:
    1. Run regedit.exe
    2. Go to HKEY_LOCAL_MACHINE
    3. File ==> Load Hive
    4. Open the hive at: C:\WIM\WIndows\System32\Config\SYSTEM
    5. Define a name for the hive like master_system_hive
  3. Change the key in the hive: ControlSet001=>Services=>Klif and give the value 2 to “Start”
  4. Unload the hive doing File==> Unload Hive
  5. Save modifications (with imagex /unmount /commit C:\WIM)

1 comment:

Chris Towles said...

Nice Post, helped me narrow down my problem. I wrote up a post to narrow down the software causing the problem and a link to the Micrsoft HotFix.

Sysprep 0x8007139f Error on Windows 7