Export (0) Print
Expand All

Windows Setup States

Updated: October 20, 2013

Applies To: Windows 8, Windows 8.1, Windows Server 2012, Windows Server 2012 R2

There are several states assigned to a Windows® image during installation. This state information can be used to detect automatically the different states and stages of Windows Setup.

The Windows image state is stored in two locations, in the registry and in a file.

  • In the registry:

    KEY: HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Setup\State

    TYPE: REG_SZ

    VALUE: StateName

  • In a file:

    FILE: %WINDIR%\Setup\State\State.ini

    SECTION: [State]

    VALUE: StateName

The following table describes the values that exist for StateName.

 

State name Description

IMAGE_STATE_COMPLETE

The image has successfully been installed. The specialize and oobeSystem configuration passes are complete. This image is not deployable to a computer that has a different hardware configuration because it is now hardware-dependent. To deploy this image to a computer that has a different hardware configuration, you must run sysprep /generalize.

IMAGE_STATE _UNDEPLOYABLE

This is the default state for an image in a given phase of Windows Setup that is not yet complete. If a process queries the IMAGE_STATE value and IMG_UNDEPLOYABLE is returned, the image is in one of the following states:

  • Setup is currently running and has not fully completed the phase. Once a given phase is complete, the IMAGE_STATE will be set to an appropriate completion value.

  • If queried online when Setup is not running, there was a failure when completing a Setup phase. This image must be reinstalled.

  • If queried offline, the image did not finish a phase and will never be deployable.

IMAGE_STATE_GENERALIZE_RESEAL_TO_OOBE

The image has successfully completed the generalize configuration pass and will continue into OOBEsystem configuration pass when Setup is initiated.

IMAGE_STATE_GENERALIZE_RESEAL_TO_AUDIT

The image has successfully completed the generalize configuration pass and will continue into audit mode when Setup is initiated.

IMAGE_STATE_SPECIALIZE_RESEAL_TO_OOBE

The image has successfully completed the specialize pass and will continue into OOBEsystem configuration pass when Setup is initiated.

IMAGE_STATE_SPECIALIZE_RESEAL_TO_AUDIT

The image has successfully completed the specialize configuration pass and will continue into audit mode when Setup is initiated.

The following examples show how to access state information.

  • To access state information from the registry:

    C:\>reg query HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Setup\State /v Imag
    eState
    
    HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Setup\State
        ImageState    REG_SZ    IMAGE_STATE_SPECIALIZE_RESEAL_TO_OOBE
    
  • To access state information from a file:

    C:\>type %windir%\Setup\State\State.ini
    [State]
    ImageState="IMAGE_STATE_SPECIALIZE_RESEAL_TO_OOBE"
    

Was this page helpful?
(1500 characters remaining)
Thank you for your feedback
Show:
© 2014 Microsoft