A Halloween prezzy for those admins with a malicious disposition - TechRepublic
General discussion
October 26, 2007 at 02:44 AM
neilb@uk

A Halloween prezzy for those admins with a malicious disposition

by neilb@uk . Updated 18 years, 9 months ago

Copy the bit between the dashed lines (NOT including the lines) into Notepad and save as “halloween.vbs”. Get a suitable horror bitmap (bmp) file showing the picture that you want [b]at a suitable resolution[/b]. Get a wav file for a scream or whatever. Copy both into c:\windows on your target’s PC (and your own for testing). Edit Halloween.vbs to set a suitable time delay after login or startup (line 7), change the bitmap name (line 24) and the wav name (line 38) to suit your files and set how long you want the change to stay up (line 45).

Note, XP only as I have avoided having to use Vista so far.

Test on your PC! Copy Halloween.vbs to the target PC C:\Documents and Settings\All Users\Start Menu\Programs\Startup.

Ooops! Edit to actually tell you what it does. At your pre-set interval after the victim user has logged in, the program will shrink all windows, hide all icons and set the users wallpaper to your HORROR version and play a wav file (the most effective that I have found is an exploding monitor screen accompanied by a loud bang). After your pre-set time, the desktop is replaced exactly as it was.

————————————-
Set oShell = CreateObject(“WScript.Shell”)
Set oFSO = CreateObject(“Scripting.FileSystemObject”)
set oDesktop=CreateObject(“Shell.Application”)

‘ Set the value to the number of msecs that you want to wait. i.e. 300000 is five minutes

wscript.sleep 300000

‘ OK, now DO IT!

‘ Minimise all of the working windows for full effect

oDesktop.MinimizeAll

‘ Get and save the old wallpaper

sOldWallpaper = oShell.RegRead(“HKCU\Control Panel\Desktop\Wallpaper”)

‘ New wallpaper. This should be a bitmap (.bmp) of a suitable resolution
‘ Copy the bmp to C:\Windows
‘ Replace the filename with your gruesome bitmap

sWinDir = oFSO.GetSpecialFolder(0)
sWallPaper = sWinDir & “\sky.bmp”

‘ Update in registry

oShell.RegWrite “HKCU\Control Panel\Desktop\Wallpaper”, sWallPaper

‘ Let the system know about the change

sCommand = _
“%windir%\System32\RUNDLL32.EXE user32.dll,UpdatePerUserSystemParameters”
oShell.Run sCommand,1,True

‘ Play a sound
‘ Copy a scream or whatever wav file into C:\Windows

sSoundFile = sWinDir & “\tada.wav”

sCommand = “sndrec32 /play /close ” & chr(34) & sSoundFile & chr(34)
oShell.Run sCommand, 0, False

‘ Time to display the Halloween wallpaper in ms

wscript.sleep 10000

‘ Put it back – Update in registry

oShell.RegWrite “HKCU\Control Panel\Desktop\Wallpaper”, sOldWallPaper

sCommand = _
“%windir%\System32\RUNDLL32.EXE user32.dll,UpdatePerUserSystemParameters”
oShell.Run sCommand,1,True

‘ Put the Windows back

oDesktop.UndoMinimizeAll
—————————————

Neil ]:)

This discussion is locked

All Comments