How to change desktop background or wallpaper in secure desktop (Winlogon) in windows 10?

Yashwanth Lokam 51 Reputation points
2021-08-31T10:49:50.257+00:00

I have tried different ways like SystemParametersInfo and IActiveDesktop to change the background image of secure desktop but nothing worked.

Windows API - Win32
Windows API - Win32
A core set of Windows application programming interfaces (APIs) for desktop and server applications. Previously known as Win32 API.
2,422 questions
C#
C#
An object-oriented and type-safe programming language that has its roots in the C family of languages and includes support for component-oriented programming.
10,242 questions
C++
C++
A high-level, general-purpose programming language, created as an extension of the C programming language, that has object-oriented, generic, and functional features in addition to facilities for low-level memory manipulation.
3,527 questions
0 comments No comments
{count} votes

Accepted answer
  1. RLWA32 40,286 Reputation points
    2021-09-06T11:51:06.397+00:00

    As far as I can tell it isn't possible to change the background/wallpaper for the secure desktop (Winlogon).

    Even Microsoft's Sysinternals Desktops utility at https://learn.microsoft.com/en-us/sysinternals/downloads/desktops only uses the background/wallpaper from the default desktop when it creates a new desktop object. It also seems that a copy of explorer needs to run with the additional desktop objects. Finally, I observed that attempting to change the background/wallpaper from a non-default desktop doesn't work.

    You could try imitating what UAC does -- create a full screen window that displays a color or an image and create your other windows above that in the z-order.

    The following image shows my test program's window running on the Winlogon desktop above a full screen window in the z-order. The full screen windows just paints a red background.

    129672-winlogondesktop.png

    And the same concept except using a bitmap for the fullscreen window instead of a solid color background -

    129644-winlogonimagedesktop.png

    1 person found this answer helpful.

4 additional answers

Sort by: Most helpful
  1. Castorix31 81,721 Reputation points
    2021-08-31T16:05:59.567+00:00

    If you're talking about the Lock Screen image that can be changed in Settings (Settings - Personalization)
    It can be done with the LockScreen API, like in the SDK sample : Lock screen personalization sample

    1 person found this answer helpful.
    0 comments No comments

  2. Yashwanth Lokam 51 Reputation points
    2021-09-01T12:52:09.293+00:00

    Thank you for your response but I am looking to change the background on secure desktop (Winlogon) or any user created desktops not on lock screen.


  3. Tasadduq Burney 8,361 Reputation points MVP
    2021-09-04T10:15:17.887+00:00

    Hello @Yashwanth Lokam !

    Please take the following steps to replace Logon UI logo.

    1. Click Start, type Regedit and press Enter
    2. Navigate to
      HKLM\Software\Microsoft\Windows\CurrentVersion\Authentication\LogonUI\Background
    3. Change value of OEMBackground to 1.
    4. Now navigate to %windir%\system32\oobe, create folder “info”, double click it and create another new folder “backgrounds”
    5. Now place your desired logon file into %windir%\system32\oobe\info\backgrounds
    6. Rename the file to backgroundDefault.jpg. (Please NOTE: Images must be less than 256kb in size).

    Hope it helps.


  4. Artemiy Moroz 271 Reputation points
    2021-09-07T16:41:51.527+00:00

    hi there!

    If you are to create a separate desktop and then create a window with a background on it, maybe you could find some use of my code. This sample code creates a separate desktop and then creates a window on it. The sample is written with MFC in mind, but it can be rewritten to pure WinAPI if needed.

    0 comments No comments