Freaky Possessed Computer with Windows Script - Halloween Fun

Computer Pranks with a Programming Twist
Numerous amusing pranks can be executed on friends utilizing a computer. Many have likely encountered the unsettling YouTube videos frequently shared for a playful fright. Previously, methods for pranking parents with a computer were explored.
However, this year, consider utilizing programming skills to playfully startle your friends. This approach offers a unique and personalized prank experience.
Creating a "Typing Ghost" Script
This article details the creation of a Windows script compatible with most contemporary Windows computers. The process is straightforward: open Notepad, input the script, and save it with a .wsf extension.
When your friends open the file, the script will automatically launch Notepad and begin typing, accompanied by typewriter sound effects. This simulates the appearance of a computer being controlled by an unseen entity.
Deployment Strategies for Maximum Impact
The effectiveness of this prank lies in its discreet deployment. Consider these options:
- Startup Folder: Place the script within the computer’s startup folder, ensuring it runs automatically upon system boot.
- Shortcut Replacement: Modify a frequently used desktop shortcut to execute the script instead of the intended application.
These methods allow for a surprising and memorable prank. The element of unexpectedness significantly enhances the effect.
Programming skills can be used to create a fun and harmless prank. Remember to use this power responsibly and ensure your friends will find the humor in it!
Creating a “Possessed” Typing Computer
The inspiration for this project stemmed from a memorable encounter during my college years. I observed a professor whose old DOS computer was autonomously typing. He had developed a DOS program capable of self-typing, complete with realistic sound effects and pauses. This article details how to replicate this effect on a Windows system, utilizing VB Script.
The initial step involves downloading a typewriter sound effect in WAV format from a free online source.

Ideally, the sound file should range between 30 seconds and a minute in duration, corresponding to the length of the text you intend to have the simulated application type. Save the file to the c:/windows/Media/ directory for easy access.

Next, create a new text file and save it with a .wsf extension. I named mine "phantomtype.wsf". Within this file, declare the necessary variables, define the path to your text file, and input the text you want the script to simulate typing.
<job><script language="VBScript">
Option Explicit
On Error Resume Next
Dim NoteShell
Dim SoundShell
Dim strText
Dim intTextLen
Dim x
Dim intPause
Dim strTempText
strSoundFile = "C:\Windows\Media\typewriter1.wav"
strText = "Hello. My name is Ryan. I have possessed your computer
and there is nothing you can do about it. Of course, I suppose you
can always close the window if you want to, but that wouldn't be any fun!"
The script utilizes two "Shell" variables to launch Notepad and the sound file. The simulated typing is achieved by sending keystrokes to the Notepad application. This is accomplished using the "CreateObject" function to instantiate application objects, followed by launching each application with a brief delay between them.
Set NoteShell = CreateObject("WScript.Shell") Set SoundShell = CreateObject("Wscript.Shell")
NoteShell.Run "notepad"
WScript.Sleep 1000
SoundShell.Run "C:\Windows\Media\typewriter1.wav", 0, True
WScript.Sleep 500
Upon execution, Notepad will open, and after a short delay, the typewriter sound will begin. At this point, the script will start sending the predefined text to Notepad, simulating a typing action.
intTextLen = Len(strText)intPause = 100
For x = 1 to intTextLen
strTempText = Mid(strText,x,1)
NoteShell.SendKeys strTempText
WScript.Sleep intPause
If intPause <= 500 Then
intPause = intPause + 100
Else
intPause = 100
End If
Next
The script first determines the length of the text string. A variable, intPause, is initialized to control the delay between each character.
The For loop iterates through each character of the text, sending it to Notepad using the SendKeys method, followed by a brief pause. The "IF" statement dynamically adjusts the pause duration to mimic the natural variations in human typing speed.
Finally, close the script with:
WScript.Quit</script>
</job>
Save the file, ensuring the .wsf extension is correct, and then double-click it to activate the “haunted” computer effect.
Here's a demonstration of the script in operation (audio of the typing sounds is not available here).

Further refinement is possible. The duration of the sound file should align with the typing speed. Looping the typing and sound effects could be implemented, but a mechanism to allow the user to terminate the script would be necessary. Without such a mechanism, the SendKeys function will continue typing indefinitely, regardless of the active window – a behavior resembling a harmless, yet potentially disruptive, virus.
Try this script and share your experiences. Did you discover any improvements or alternative approaches? Feel free to share your thoughts in the comments below.
Image Credit : Shutterstock
Related Posts

Touchscreen on Windows PC: Do You Need It?

Find Lost Windows or Office Product Keys - Easy Guide

Windows 10 Resetting Settings: Why It Happens & How to Fix

Monitor FPS in UWP Games on Windows 10 - A Simple Guide
Remove 'Get Windows 10' Icon & Stop Upgrade Notifications
