Cached image not being updated with LockScreen.SetImageFileAsync(file);


I'm using it in a desktop bridge app. The first time I used it, it set the image correctly. From then on, every time it's executed, it just sets the same first image, no matter which file I point it at. I can even see the correct image in settings->lock-screen. But when I click on it there, I get the cached image instead. Even after a reboot, the first cached image is still the one shown.

Setting the image in other ways (such as from a UWP app) works fine.


Another strange thing is that when I run the app for the first time, I get:

System.IO.FileNotFoundException: 'The system cannot find the file specified. (Exception from HRESULT: 0x80070002)'

at the LockScreen.SetImageFileAsync. But then I just run it again and it doesn't throw that exception.

More Info

Targeting and Minimum version are Windows 1903, as is the computer itself. In sign-in options I have "use my sign-in info to automatically..." turned off. I also have hibernation off (and therefore fast startup is disables as well). I have tested this on 2 computers with the same results including the FileNotFoundException.

asked on Stack Overflow Jul 8, 2019 by ispiro • edited Jul 18, 2019 by ispiro

1 Answer


As mentioned in the comments, this is a bug in Windows.

Thanks Stefan Wick MSFT.

answered on Stack Overflow Jul 15, 2019 by ispiro

User contributions licensed under CC BY-SA 3.0