The ChangeDisplaySettingsEx function works well in WinPE version 10.0.22621.1, but it fails with a DISP_CHANGE_FAILED (-1) error in WinPE version 10.0.26100.#.

sun kim 0 Reputation points
2024-12-26T01:19:09.0733333+00:00

The ChangeDisplaySettingsEx function works well in WinPE version 10.0.22621.1.

However, in WinPE version 10.0.26100.1, it fails with a DISP_CHANGE_FAILED (-1) error, and GetLastError returns 0. The same issue occurs in WinPE version 10.1.26100.2454.

I would like to use the ChangeDisplaySettingsEx function in WinPE version 10.0.26100.1. Is there a solution for this?

Why does it fail to work in the newer PE version?

I considered adding a display driver to the latest PE version, but it seems strange since the function works fine in the earlier PE version.

If this is the case, it makes me wonder if the older PE version might be more stable than the latest one, not just for the display driver but also for other essential drivers like disk drivers.

Windows 11
Windows 11
A Microsoft operating system designed for productivity, creativity, and ease of use.
10,409 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Daisy Zhou 27,596 Reputation points Microsoft Vendor
    2024-12-27T07:53:00.9133333+00:00

    Hello

    Thank you for posting in Q&A forum.

    The DISP_CHANGE_FAILED error with the ChangeDisplaySettingsEx function in WinPE version 10.0.26100.# could be due to several reasons. Here are a few potential causes and solutions:

    1. Unsupported Display Mode: The display mode you are trying to set might not be supported in the newer version. Ensure that the resolution, color depth, and refresh rate are valid for the display device.
    2. Permissions Issue: WinPE environments can have different permission settings. Make sure that your script or application has the necessary permissions to change display settings.
    3. Driver Compatibility: There might be differences in display driver support between the two versions of WinPE. Check if the display drivers are up to date and compatible with WinPE 10.0.26100.#.
    4. Registry Settings: The function might be failing to write settings to the registry. Ensure that the registry settings for display configurations are accessible and writable.

    I hope the information above is helpful.

    If you have any questions or concerns, please feel free to let us know.

    Best Regards,

    Daisy Zhou

    ============================================

    If the Answer is helpful, please click "Accept Answer" and upvote it.

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.