Vista SP1 Installations Deployed Using Operating System Deployment Cannot Hibernate

Vista SP1 Installations Deployed Using Operating System Deployment Cannot Hibernate

  • Comments 6
  • Likes

[Today's post is provided by Nathan Barnett. This information was originally published on the TechNet Configuration Manager Documentation forum, and its popularity has resulted in also posting it here for wider visibility.]

Issue

When the Configuration Manager 2007 operating system deployment feature is used to deploy a Vista SP1 image, a new boot configuration data (BCD) store is created using the BCD template.  Configuration Manager 2007 explicitly creates the Boot Manger and Operating System objects from the BCD template, but allows the Resume object to be created implicitly by Windows Vista when it goes through mini-setup.  Vista SP1 correctly generates the Resume object during mini-setup but the associated Resume settings objects are not generated. Because there are no Resume settings objects, hibernate functionality does not work.

Solution

To resolve this issue, run the following script on Vista SP1 computers deployed using Configuration Manager 2007 operating system deployment to create the missing Resume settings objects.  To run the script type the following at a command prompt:

cscript.exe /nologo scriptname.vbs

This script can be deployed in two scenarios:

  • Run as part of the Vista SP1 deployment: Incorporate the script into the operating system deployment task sequence as a Run Command Line step once the new operating system is installed.
  • Run after Vista SP installation: Incorporate the script into a software distribution package/program and then advertise it to existing computers previously deployed with Vista SP1 using Configuration Manager 2007 SP1.

Code Snippet

' Connect to WMI
set oLocator = CreateObject( "WbemScripting.SWbemLocator" )
set oRootWMI = oLocator.ConnectServer( ".", "root\wmi" )
oRootWMI.Security_.ImpersonationLevel = 3
' Connect to BCD
set oBCD = GetObject( "winmgmts:{impersonationlevel=Impersonate,(Backup,Restore)}!root/wmi:BcdStore")
if Err.number <> 0 then
    WScript.Echo "ERROR: Failed to connect to BCD"
    WScript.Quit(1)
end if
' Open the system store
if not oBCD.OpenStore( "", oBcdStore ) then
    WScript.Echo "ERROR: Failed to open the system BCD store"
    WScript.Quit(1)
end if
set oBCD = nothing
const ResumeLoaderSettingsBcdObject = "{1afa9c49-16ab-4a5c-901b-212802da9460}"
const GlobalSettingsBcdObject = "{7ea2e1ac-2e61-4728-aaa3-896d9d0a9f0e}"
' Check to see if the {resumeloadersettings} object already exists
if oBcdStore.OpenObject( ResumeLoaderSettingsBcdObject, objWBM ) then
    WScript.Echo "Resume Loader Settings object already exists in BCD"
    WScript.Echo "No changes have been made to the system"
    WScript.Quit(1)
end if
WScript.Echo "Creating new {resumeloadersettings} object..."
if not oBcdStore.CreateObject( ResumeLoaderSettingsBcdObject, &h20200004, oResumeSettings) then
    WScript.Echo "ERROR: Failed to create the BCD object"
end if
if not oResumeSettings.SetObjectListElement(&h14000006, Array(GlobalSettingsBcdObject )) then
    WScript.Echo "ERROR: Failed to set the Inherit element"
end if
WScript.Echo "Finished updating BCD"
 

--Nathan Barnett

This posting is provided "AS IS" with no warranties, and confers no rights.

Your comment has been posted.   Close
Thank you, your comment requires moderation so it may take a while to appear.   Close
Leave a Comment
  • 237 Microsoft Team blogs searched, 115 blogs have new articles in the past 7 days. 327 new articles found

  • The folks over on the Configuration Manager team blog have a great post on how to resolve an issue we’re

  • Feed: The Configuration Manager Support Team Blog Posted on: Tuesday, April 07, 2009 9:32 AM Author:

  • Would there be any positives using this method over simply running the cmd:

    bcdedit.exe /create {resumeloadersettings} /d "Resume Loader Settings"

    with a "Run Command Line" task?

  • I have the same concern if using BCEDIT command line would be sufficient.  I have already deployed this command line to all Vista laptops and now, I am wondering if the fix provided here is actually the fix?  Please post your recommendation.

  • I imagine the concern in using the bcdedit command line over the above is, "what if the entry already exists"?  We've got this pretty consistently in our environment too, right now.  In fact, I was just about to implement the BCDEdit command as a "run command line" myself.  Now I'm re-thinking it.  I assume the thought is that, at some point in the future, a patch or service pack will fix the issue and you'll end up with (at best) two BCD entries or (at worst) a broken OSD process.