### Author Topic: Windows Wallpaper/Lockscreen  (Read 985 times)

#### clamicun

• Member
• Posts: 257
##### Windows Wallpaper/Lockscreen
« on: February 12, 2018, 01:26:54 AM »
Change_Wallpaper.asm installes a new wallpaper. (Windows 7 and Windows 10 64b)
It uses the function "SystemParametersInfo" to know what is the actual wallpaper.

INVOKE SystemParametersInfo, SPI_GETDESKWALLPAPER, MAX_PATH, addr act_background, 0   ;Aktuelles Desktop Wallpaper in act_background

Is there a function which returns the actual lockscreen ?

#### AW

• Member
• Posts: 1482
• Let's Make ASM Great Again!
##### Re: Windows Wallpaper/Lockscreen
« Reply #1 on: February 13, 2018, 12:18:57 AM »
Do you mean the path to the current wallpaper?
Probably this:
HKEY_CURRENT_USER\Control Panel\Desktop\Wallpaper

#### clamicun

• Member
• Posts: 257
##### Re: Windows Wallpaper/Lockscreen
« Reply #2 on: February 13, 2018, 03:04:34 AM »
No,of course not the wallpaper.
The wallpaper is changed with my prog.   "Change_Wallpaper.zip".
(You have to comment the second line "include Include\cmc_macros.inc")

What I am looking for is how to change the "LockScreen", which appears on start or strg-alt-del.

LockScreen images are stored in "C:\ProgramData\Microsoft\Windows\SystemData\S-xxxxxxxxx\ReadOnly\LockScreen_A\LockScreen.jpg  or LockScreen_B\LockScreen.jpg or LockScreen_C\LockScreen.jpg"  ....  (might be different on your computer).

But which one is the current ? That is why  I need the function (if there is one).

The function SystemParametersInfo returns the current wallpaper but not the lockscreen.

#### AW

• Member
• Posts: 1482
• Let's Make ASM Great Again!
##### Re: Windows Wallpaper/Lockscreen
« Reply #3 on: February 13, 2018, 06:28:44 PM »
The lockscreen images are stored here:
C:\Users\user_name\AppData\Local\Packages\Microsoft.Windows.ContentDeliveryManager_cw5n1h2txyewy\LocalState\Assets
To be seen you will have to rename them to a jpg extension.

Which one is shown, will depend on a few things, sometimes this one is valid
HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows\CurrentVersion\Lock Screen\Creative\LandscapeAssetPath

sometimes not. I will not dig further, but hope you will and find the whole story.

#### clamicun

• Member
• Posts: 257
##### Re: Windows Wallpaper/Lockscreen
« Reply #4 on: February 13, 2018, 10:25:48 PM »
aw27, thanks for your help, but you don't seem to get what I am looking for.

A function like SystemParametersInfo which - with the correct parameters - returns the current lockscreen.

btw. I forgot to say that I am testing this on windows10 64b. So most registrypaths are different.
Again, thank you.

#### jj2007

• Member
• Posts: 8734
• Assembler is fun ;-)
##### Re: Windows Wallpaper/Lockscreen
« Reply #5 on: February 13, 2018, 10:56:52 PM »
https://www.howtogeek.com/112110/how-to-set-a-custom-logon-screen-background-on-windows-7/

Includes also instructions for Win8 and Win10. There is apparently no direct way to change it, but you could modify registry keys...

#### AW

• Member
• Posts: 1482
• Let's Make ASM Great Again!
##### Re: Windows Wallpaper/Lockscreen
« Reply #6 on: February 13, 2018, 11:26:05 PM »
A function like SystemParametersInfo which - with the correct parameters - returns the current lockscreen.

btw. I forgot to say that I am testing this on windows10 64b. So most registrypaths are different.
Again, thank you.
I tested on win10 64b as well, and I don't think you will find any function.
Microsoft spread the images over a few places, even here C:\Windows\Web\Screen, is considering the subject top secret and critical for its survival.

#### clamicun

• Member
• Posts: 257
##### Re: Windows Wallpaper/Lockscreen
« Reply #7 on: February 14, 2018, 05:09:54 AM »
By now I searched a lot . Seems there is no function to do it the way SystemParametersInfo (SPI_GETDESKWALLPAPER) does.
There is a bit of confusion. MS changed the rules for lockscreens a couple of times the last 1.5 years.
And the next stupid win10 backup might change it again.

In Windows7 it was easy because the current lockscreen was always !! in
C:\Windows\System32\oobe\info\backgrounds\BackgroundDefault.jpg

So you had to simply copy a new file "BackgroundDefault.jpg" into the path (after renaming or deleting the old one).

Windows10 is different. The lockscreen images are not in one place but in: