How to display a message box in Windows 10

Applications usually display various in Windows 10, which are used to notify the user of something that requires their attention.

Such messages are for example "You want to save changes" when you try to close a program with unsaved changes. These messages are useful, and they don't have to come from just one app. And Windows 10 users can display a custom box on their screen, using a script, or a PowerShell script, or by running a command on the command line or in PowerShell.

A custom message box will have a title, your message, and a call-to-action button, i.e. an OK button that will ignore the message. If you want to display one of your own then here are some ways you can do it. Let's go from the hardest to the easiest. The texts of your message can also be in the Greek language.

1. With Batch Script or PowerShell
Follow the steps below to create the script.

1.1 Open a new one in Notepad (Notepad) or use any expl text of your choice.
1.2 Paste the following into the Notepad file.


If you plan to use a PowerShell script, remove the first line: @echo off.
1.3 Edit the script as follows:
Replace ““My Message”With the message you want the message box to display.
Replace "Message title”With the title of the message box you want.


Example:


Save the file with the .bat extension, for example test.bat, if you want to run it directly as a batch script or with the .ps1 extension for a PowerShell script.
1.4 Run the script and the message box will appear.

2. With Command Prompt or PowerShell
Displaying a message box from the command line or from PowerShell is much easier . You do not need administrator rights to display the message box.

A. With Command Prompt
2.A.1 Open the command prompt.
2.A.2 Execute the following command on it.


2.A.3 Edit the command as below to define your custom message and title.
Replace ““My Message”With the message you want the message box to display.
Replace ““Message Title”With the title you want the message box to have.

For example:


B. With PowerShell
2.B.1 Open PowerShell.
2.B.2 Execute the following command.


2.B.3 Edit the command to add your own message and title.
Replace ““My Message”With the message you want the message box to display.
Replace ““Message Title”With the title you want the message box to have.

Once you have created a script you can save it to your disk and call it whenever you want through a program or through a Windows process, such as this one here, or through the schedule or through Windows startup, etc.

iGuRu.gr The Best Technology Site in Greecefgns

every publication, directly to your inbox

Join the 2.100 registrants.

Written by Dimitris

Dimitris hates on Mondays .....

Leave a reply

Your email address is not published. Required fields are mentioned with *

Your message will not be published if:
1. Contains insulting, defamatory, racist, offensive or inappropriate comments.
2. Causes harm to minors.
3. It interferes with the privacy and individual and social rights of other users.
4. Advertises products or services or websites.
5. Contains personal information (address, phone, etc.).