The applications usually display various messages in Windows 10, which are used to notify the user for something that requires his 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 message box on their screen by using a script, or a PowerShell script, or by running a command in line command line or PowerShell.
A custom message box will have a title, your message, and an action button, ie an OK button that overlooks the message. If you want to display your own alert then here are some ways you can do it. We go from the most difficult to the easiest. The texts of your message can also be in Greek.
1. With Batch Script or PowerShell
Follow the steps below to create the script.
1.1 Open a new file in Notepad or use any text editor 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
Viewing a message box from the command line or from PowerShell is a much easier process. You do not need administrator privileges 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.