PDF download Download Article PDF download Download Article

Do you want to create a custom Windows error message? Whether you're an application developer or someone who wants to prank their coworker, knowing how to create a custom error message is an essential ability. To learn how to create a custom Windows error message, follow this guide.

Method 1
Method 1 of 2:

Single Error Dialog

PDF download Download Article
  1. Open the Notepad app.[1]
    • Press the Win+R keys simultaneously.
    • Type notepad into the Run dialog.
    • Hit Enter or click OK.
    • x=msgbox("Your Message Here", Button+Icon, "Your Title Here")
    Advertisement
  2. Replace Button in the code you pasted into Notepad with one of the following:
    • 0 - OK
    • 1 - OK and Cancel
    • 2 - Abort, Retry and Ignore
    • 3 - Yes, No and Cancel
    • 4 - Yes and No
    • 5 - Retry and Cancel
  3. Replace Icon in the code that you pasted into Notepad with one of the following:
    • 0 = No Icon
    • 16 = Critical Icon (a.k.a. "X" icon)
    • 32 = Question Icon (a.k.a. "?" icon)
    • 48 = Warning Icon (a.k.a. "!" icon)
    • 64 = Info Icon (a.k.a. "i" icon)
  4. Replace Your Title Here in the code you pasted into Notepad with what you want the title of the error message to be.[2]
  5. Replace Your Message Here in the code you pasted into Notepad with what you want the error message to say.[3]
  6. Press Ctrl+S on your keyboard.
  7. [4]
  8. Click Save.
  9. Double-click the file that was created.
  10. Advertisement
Method 2
Method 2 of 2:

Sequence of Error Dialogs

PDF download Download Article

Create a sequence of error messages. Messages will display one at a time, and closing a message will display the following one.

  1. Open the Notepad app.[5]
    • Press the Win+R keys simultaneously.
    • Type notepad into the Run dialog.
    • Hit Enter or click OK.
    • x=msgbox("Your Message Here", Button+Icon, "Your Title Here")
  2. Replace Button in the code you pasted into Notepad with one of the following:
    • 0 - OK
    • 1 - OK and Cancel
    • 2 - Abort, Retry and Ignore
    • 3 - Yes, No and Cancel
    • 4 - Yes and No
    • 5 - Retry and Cancel
  3. Replace Icon in the code that you pasted into Notepad with one of the following:
    • 0 - No Icon
    • 16 - Critical Icon (a.k.a. "❌" icon)
    • 32 - Question Icon (a.k.a. "❓" icon)
    • 48 - Warning Icon (a.k.a. "❗" icon)
    • 64 - Info Icon (a.k.a. "ℹ️" icon)
  4. Replace Your Title Here in the code you pasted into Notepad with what you want the title of the error message to be.
  5. Replace Your Message Here in the code you pasted into Notepad with what you want the error message to say.[6]
  6. Repeat these steps, starting from Step 3.[7]
    • This error message will display after the previously created one has been closed.
  7. Press Ctrl+S on your keyboard.
  8. Click Save.
  9. Double-click the file that was created.
  10. Advertisement

Community Q&A

Search
Add New Question
  • Question
    Is there a way to make a custom icon for the error?
    Community Answer
    Community Answer
    No, you can try using different numbers, but most likely a real error will pop up.
  • Question
    How do I make it do actions to my computer?
    Community Answer
    Community Answer
    You can't do that. It's a fake error, meaning it won't do anything to your computer.
  • Question
    How do I create an input text box in the message?
    Community Answer
    Community Answer
    Do this: InputVariableName=InputBox("Prompt","Title","Value which is optional")
See more answers
Ask a Question
200 characters left
Include your email address to get a message when this question is answered.
Submit
Advertisement

Video

Tips

Tips from our Readers

  • Put +4096 after the icon number. Then you'll get a system modal (all apps will stop working until you respond).
  • To go to the next line, use +vbnewline+.
Submit a Tip
All tip submissions are carefully reviewed before being published
Name
Please provide your name and last initial
Thanks for submitting a tip for review!

You Might Also Like

Make a Popup (for Windows)Make a Popup (for Windows)
Make an Easy E Bomb Using NotepadMake an Easy E Bomb Using Notepad
Create a Fake and Harmless VirusCreate a Fake and Harmless Virus
Make a Video Game With CmdMake a Video Game With Cmd
Add a Password to a .Bat FileA Complete Guide to Adding Password Protection to .Bat Files
Make an Exe FileMake an Exe File
Shut Down a Computer Using Notepad Shut Down Your Computer Using a Notepad Bat File
Create Options or Choices in a Batch FileCreate Options or Choices in a Batch File
Create a Simple Calculator in Visual Basic 6.0Create a Simple Calculator in Visual Basic 6.0
Make a Game with Notepad3 Cool Ways to Make Your Own Game with Notepad
Make a Program Using NotepadMake a Program Using Notepad
Make a Shutdown Shortcut in Windows Create a Shutdown Shortcut on Your Windows Desktop or Taskbar
Make a Funny Prank VirusMake a Funny Prank Virus
Make a Scary Batch File for Command Prompt Crash a Computer with a Scary Batch File
Advertisement

About This Article

Tested by:
wikiHow Technology Team
wikiHow is a “wiki,” similar to Wikipedia, which means that many of our articles are co-written by multiple authors. To create this article, 57 people, some anonymous, worked to edit and improve it over time. This article has been viewed 658,541 times.
60 votes - 75%
Co-authors: 57
Updated: April 6, 2025
Views: 658,541
Categories: Computer Pranks
Thanks to all authors for creating a page that has been read 658,541 times.

Did this article help you?

Did this article help you? Say thanks with a small tip.
icon
$1
$3
$5
Leave a Tip
Support our mission to help everyone in the world learn how to do anything.
Advertisement