https://github.com/slavakuntsov/powershell-wallpaper-changer
Automatically changes the desktop wallpaper on Windows.
https://github.com/slavakuntsov/powershell-wallpaper-changer
Last synced: over 1 year ago
JSON representation
Automatically changes the desktop wallpaper on Windows.
- Host: GitHub
- URL: https://github.com/slavakuntsov/powershell-wallpaper-changer
- Owner: SlavaKuntsov
- Created: 2025-02-07T21:32:21.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2025-02-19T20:58:24.000Z (over 1 year ago)
- Last Synced: 2025-02-19T21:32:19.171Z (over 1 year ago)
- Language: PowerShell
- Size: 1000 Bytes
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: change_wallpaper.ps1
Awesome Lists containing this project
README
# Wallpaper Changer
This project allows you to change your desktop wallpaper randomly from a specified folder of images (JPG and PNG). It works on Windows and can be executed silently without displaying the PowerShell console.
## Files
##### `run_hidden.vbs`
This VBScript runs the PowerShell script `change_wallpaper.ps1` in the background without opening a console window.
##### `change_wallpaper.ps1`
This PowerShell script randomly selects an image file (JPG or PNG) from the `wallpapers` folder and sets it as the desktop wallpaper.
## Requirements
- PowerShell (typically pre-installed on Windows).
- Windows operating system.
- Image files in `.jpg` or `.png` format placed in the `wallpapers` folder.
## Setup
1. Clone this repository:
```bash
git clone https://github.com/SlavaKuntsov/powershell-wallpaper-changer.git
cd wallpaper-changer
```
2. Add your image files (JPG or PNG) to the `wallpapers` folder.
3. To run the wallpaper changer, execute the `change_wallpaper.ps1` script using `powershell`:
```bash
powershell -nologo -command "& {.\change_wallpaper.ps1}"
```
This will silently change the wallpaper to a random image from the `wallpapers` folder.
## Automating Wallpaper Change
To automate wallpaper changes at regular intervals, use the **Task Scheduler** in Windows. Here’s how you can set it up:
1. Open **Task Scheduler** (search for it in the Start menu).
2. Click on **Create Task**.
3. Under the **General** tab, name your task and set it to **Run with highest privileges**.
4. Under the **Actions** tab, click **New**, and set the action to **Start a program**.
- In the **Program/script** field, enter:
```bash
powershell
```
- In the **Add arguments (optional)** field, enter:
```bash
-nologo -command "& {.\change_wallpaper.ps1}"
```
5. Under the **Triggers** tab, set the task to repeat at your desired interval (e.g., every 30 minutes).
Now, the wallpaper will automatically change at the specified interval without opening a console window.