-
Notifications
You must be signed in to change notification settings - Fork 0
/
powershell
executable file
·45 lines (39 loc) · 1.83 KB
/
powershell
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
:: Give your co-workers a quick information security lesson by derulo'ing them.
:: Maybe next time they will remember to lock their machine.
::
:: What?
:: The script instantly changes the desktop's background of the machine it's
:: run on.
::
:: Why?
:: If your workplace is friendly enough to pull off pranks and some of you care
:: about information security, the one and only Jason Derulo will be a perfect
:: reminder of how quickly damage can be done and that an unattended computer
:: should be locked.
::
:: NOTE: This script is Windows-specific – it amends current user's registry
:: keys.
::
:: Usage:
:: On a Windows installation supporting PowerShell:
:: 1. Rename the script to 'powershell.bat'.
:: 2. Run 'powershell.bat'.
:: Turn off the output to the command-line
@echo off
:: Delete 'derulo.bmp' in case a file with such name it's already there
del %CD%\derulo.bmp
:: Download derulo.bmp
Powershell.exe -executionpolicy remotesigned "Invoke-RestMethod -Uri https://i7.putstuffonline.com/0rtEegbeDUI/putstuffonline.bmp -OutFile derulo.bmp"
:: Set the wallpaper to the one supplied
:: Source: https://social.technet.microsoft.com/Forums/en-US/w7itproui/thread/72a9b4bf-071b-47cd-877d-0c0629a9eb90/#c58b97cd-3a91-4409-80aa-39d53ef638cf
reg add "HKEY_CURRENT_USER\Control Panel\Desktop" /v Wallpaper /t REG_SZ /d "" /f
reg add "HKEY_CURRENT_USER\Control Panel\Desktop" /v Wallpaper /t REG_SZ /d %CD%\derulo.bmp /f
:: Run the 'update' dll multiple times to ensure an immediate effect
start "" /b rundll32.exe user32.dll,UpdatePerUserSystemParameters
start "" /b rundll32.exe user32.dll,UpdatePerUserSystemParameters
start "" /b rundll32.exe user32.dll,UpdatePerUserSystemParameters
start "" /b rundll32.exe user32.dll,UpdatePerUserSystemParameters
start "" /b rundll32.exe user32.dll,UpdatePerUserSystemParameters
:: Clean up
cls
del %CD%\powershell.bat