A PowerShell project that brings a Bing Spotlight-like lock screen experience to Windows 11-10 LTSC. Should also work with non-LTSC Windows and probably not with Home versions.
The project downloads the current Bing image, saves a clean original copy, renders a text banner on a separate copy used as the lock screen image, applies it via the registry, keeps a local image history, and falls back to the latest valid image if Bing is unavailable.
Windows Spotlight is not natively available on some LTSC editions. This project provides a simple, local, and installable alternative based on Windows PowerShell 5.1.
- interactive installation
- Bing market selection during setup
- configurable retention for generated images
- automatic fallback to the latest valid image
- UHD image download with automatic resize to screen resolution
- QR code linking to a Google search for the image subject
- local logging
- scheduled task running as
SYSTEM - clean uninstall with explicit confirmation
- Windows 11 LTSC
- Windows PowerShell 5.1
- Administrator rights
- Install-BingSpotlight.ps1: installs the solution and creates the scheduled task
- BingSpotlight.ps1: main script executed by the scheduled task
- Uninstall-BingSpotlight.ps1: clean uninstaller
- plan.md: design notes and technical details
Open PowerShell as Administrator in the project directory.
If script execution is blocked on the machine, temporarily allow it for the current session:
Set-ExecutionPolicy -Scope Process -ExecutionPolicy BypassThen run the installer:
.\Install-BingSpotlight.ps1The installer asks for:
- how many days generated images should be kept
- which Bing market to use, for example
fr-FRoren-US - which language to use for the Google search QR code, for example
froren(defaults to the market language)
After installation, the files are copied to:
C:\ProgramData\BingSpotlight
No reinstall is needed. Copy the updated script over the installed one:
Copy-Item ".\BingSpotlight.ps1" "C:\ProgramData\BingSpotlight\BingSpotlight.ps1" -ForceIf the new version introduces configuration keys (see Changelog), add them manually to C:\ProgramData\BingSpotlight\config.json. Missing keys are usually handled with automatic defaults, but adding them explicitly is recommended.
After updating, trigger a test run to confirm everything works:
Start-ScheduledTask -TaskPath "\Custom\" -TaskName "BingSpotlight_LockScreen"Then check the log:
Get-Content "C:\ProgramData\BingSpotlight\logs\BingSpotlight.log" -Tail 20The scheduled task and the rest of the installed structure remain unchanged.
C:\ProgramData\BingSpotlight\
├── BingSpotlight.ps1
├── Uninstall-BingSpotlight.ps1
├── config.json
├── logs\
│ └── BingSpotlight.log
├── source\
│ └── bing_source.jpg
└── rendered\
├── lockscreen_2026-03-22.jpg
├── original_2026-03-22.jpg
└── ...
The configuration file is created automatically here:
C:\ProgramData\BingSpotlight\config.json
Example:
{
"Market": "fr-FR",
"Language": "fr",
"RetentionDays": 14,
"RetryCount": 5,
"RetryDelaySeconds": 15
}| Key | Type | Default | Description |
|---|---|---|---|
Market |
string | fr-FR |
Bing API market code |
Language |
string | derived from Market | Two-letter language code used for the Google search QR code (fr, en, de, …) |
RetentionDays |
int | 14 |
Number of days to keep rendered images |
RetryCount |
int | 5 |
Maximum number of retry attempts for network calls |
RetryDelaySeconds |
int | 15 |
Delay in seconds between retry attempts |
At each run, the main script:
- reads
config.json - calls the Bing API for the configured market
- downloads the UHD version of the current image (3840x2160)
- detects the primary screen resolution via WMI
- resizes the image to match the screen resolution
- saves the clean original image (no text, no banner) as a dated JPEG in
rendered - renders the title, copyright, and QR code banner on a copy of the image
- saves the copy as the lock screen JPEG in
rendered - applies the lock screen image through
HKLM - removes older images according to the configured retention period
If the screen resolution cannot be detected (e.g. headless SYSTEM session), the UHD source is used as-is.
Using a dated filename helps reduce Windows lock screen caching issues.
Each rendered image includes a small QR code on the right side of the banner. Scanning it opens a Google search page for the image subject, using the language specified in the Language configuration key.
The QR code is generated via the goqr.me public API. If the API is unreachable, the image is rendered normally without the QR code.
The project does not blindly overwrite the current state when Bing is unavailable.
- network calls use configurable retry logic
- if Bing remains unavailable, the script tries to reapply the latest valid image stored in
rendered - if no valid image exists yet, the run fails cleanly and writes the error to the log
To trigger an immediate test run:
Start-ScheduledTask -TaskPath "\Custom\" -TaskName "BingSpotlight_LockScreen"Then verify:
- that
lockscreen_*.jpgandoriginal_*.jpgfiles appear inC:\ProgramData\BingSpotlight\rendered - that the log contains a complete successful run
- that the lock screen shows the generated image
Quick log check:
Get-Content "C:\ProgramData\BingSpotlight\logs\BingSpotlight.log" -Tail 20Expected lines usually include:
[INFO] Execution started. RetentionDays=...
[INFO] Metadata retrieved: ...
[INFO] Source image downloaded.
[INFO] Original image saved (clean): ...
[INFO] Lock screen image created: ...
[INFO] Registry updated successfully.
[INFO] Cleanup finished.
To uninstall:
C:\ProgramData\BingSpotlight\Uninstall-BingSpotlight.ps1The script asks the user to type OUI to confirm, then it:
- removes the
\Custom\BingSpotlight_LockScreenscheduled task - clears
PersonalizationCSPvalues if they still point to the installation directory - removes
C:\ProgramData\BingSpotlight
- the project targets Windows PowerShell 5.1, not PowerShell 7 as the primary runtime
System.Drawingis used for image rendering- the QR code is generated via the goqr.me public API; if it is down, the image renders without it
- the Google search language (
hlparameter) is controlled by theLanguageconfiguration key - the Bing endpoint used here is an unofficial
HPImageArchiveAPI - this project is not affiliated with Microsoft
- the original image is now preserved as a clean JPEG (
original_*.jpg) without any text or banner - the lock screen image (
lockscreen_*.jpg) is a separate copy with the banner rendered on top - QR code now links to a Google search instead of a Wikipedia search
- added
Languageconfiguration key to control the Google search language (hlparameter) - the installer now prompts for the search language during setup (defaults to the market language)
- existing installations without
Languageinconfig.jsonwill automatically derive it from theMarketvalue
This repository is licensed under the GNU Affero General Public License v3.0.
See LICENSE.
