News:

Masm32 SDK description, downloads and other helpful links
Message to All Guests

Main Menu

Windows Wallpaper/Lockscreen

Started by clamicun, February 12, 2018, 01:26:54 AM

Previous topic - Next topic

clamicun

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 ?

aw27

Do you mean the path to the current wallpaper?
Probably this:
HKEY_CURRENT_USER\Control Panel\Desktop\Wallpaper

clamicun

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.

aw27

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

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

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...

aw27

Quote from: clamicun on February 13, 2018, 10:25:48 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

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:
C:\ProgramData\Microsoft\Windows\SystemData\S-xxxxxxxxx\ReadOnly\

    LockScreen_A\LockScreen.jpg
or LockScreen_B\LockScreen.jpg
or LockScreen_C\LockScreen.jpg 
or LockScreen_D\LockScreen.jpg 

... (interesting to know what happens if it comes to LockScreen_Z\LockScreen.jpg
By now on my computer there are 6 LockScreen.jpg" (Lockscreen_A to LockScreen_F but it is hard to know which is the current.

It is not important (you change it via settings with some clicks).
Ok. guys Thank you