Make a Fake Error Message in Windows
Do you want to create a custom Windows error message? Whether you're an application developer or someone who wants to prank their co-worker, 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.
Contents
Steps
Single Error Dialog
- Open the Run dialog. Press ⊞ Win+R on your keyboard.
- Open Notepad. Type notepad into the Run dialog and click OK.
- Copy and paste the following code into Notepad. Notepad should look like this.
- x=msgbox("Your Message Here", Button+Icon, "Your Title Here")
- Customize the button(s) of your error message. 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
- Customize the icon of your error message. 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)
- Customize the title of your error message. Replace Your Title Here in the code you pasted into Notepad with what you want the title of the error message to be.
- Customize the contents of your error message. Replace Your Message Here in the code you pasted into Notepad with what you want the error message to say.
- Open the Save As window. Press Ctrl+S on your keyboard.
- Expand the combo box next to Save as type and select All Files.
- Type a name for your file followed by a period and vbs.
- Choose a location to save the file to.
- Save the file. Click Save.
- Display the error message. Double-click the file that was created.
Sequence of Error Dialogs
Create a sequence of error messages. Messages will display one at a time, and closing a message will display the following one.
- Open the Run dialog. Press ⊞ Win+R on your keyboard.
- Open Notepad. Type notepad into the Run dialog and click OK.
- Copy and paste the following code into Notepad. Notepad should look like this.
- x=msgbox("Your Message Here", Button+Icon, "Your Title Here")
- Customize the button(s) of your error message. 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
- Customize the icon of your error message. 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)
- Customize the title of your error message. Replace Your Title Here in the code you pasted into Notepad with what you want the title of the error message to be.
- Customize the contents of your error message. Replace Your Message Here in the code you pasted into Notepad with what you want the error message to say.
- Switch to a subsequent line position.
- Create another error message (if desired). Repeat these steps, starting from Step 3.
- This error message will display after the previously created one has been closed.
- Open the Save As window. Press Ctrl+S on your keyboard.
- Expand the combo box next to Save as type and select All Files.
- Type a name for your file followed by a period and vbs.
- Choose a location to save the file to.
- Save the file. Click Save.
- Display the error message. Double-click the file that was created.
Related Articles
- Open MSG Files
- Program with VBScript
- Pull a Computer Prank on Windows
- Make a Shutdown Computer Prank
- Create a Cool Desktop Prank
- Do the Computer Keyboard Prank
Sources and Citations
- https://www.wikihow.com/Make-an-Error-Message-in-Microsoft-Windows-%28No-Downloads%29 (Adapted introduction from this article)