SYNOPSIS
msgbox
[
DESCRIPTION
msgbox displays a message box. The message box can include predefined icons, buttons, and text, and takes a response from the user. msgbox can be run from a shell script to inform users of certain conditions or necessary actions, and to get feedback from the user on the desired action.
- Note:
-
To include a newline in the specified Message, you should use the echo utility to generate the text. For example, msgbox Sample_Title "$(echo 'Line 1\nLine 2')" displays Line 1 on one line and Line 2 on the next.
Options
-b button-
includes a button or buttons with the message box. These buttons can be one of the following:
abortretryignore ok okcancel retrycancel yesno yesnocancel
- Note:
-
Button options that contain more than one word appear on screen as multiple buttons. For example, the abortretryignore option would appear on screen as three separate buttons: abort, retry, and ignore.
-D dtop-
Specifies dtop as the desktop where the message box is displayed.
-d defbutton-
defines a default button. This option defines which button appears selected when the message box first appears. defbutton must be one of 1, 2, or 3.
-f -
positions the message box in the foreground of the window.
-i icon-
includes an icon with the message box. icon must be one of the following:
asterisk exclamation hand information question stop
On 10/2016/2019/11/2022/2025 asterisk and information display the same icon, and hand and stop display the same icon.
-q -
runs in quiet mode. Normally a response is printed to standard output and an exit code is returned;
-q suppresses the print-out to standard output. -W winstation-
Specifies winstation as the windowstation where the message box is displayed. When you specify this option, you must also specify the
-D option to specify a desktop on that windowstation. The-W option must precede the corresponding-D option.
DIAGNOSTICS
Exit values are printed to standard output unless otherwise specified by use
of the
PORTABILITY
Windows 10. Windows Server 2016. Windows Server 2019. Windows 11. Windows Server 2022. Windows Server 2025.
AVAILABILITY
PTC MKS Toolkit for Power Users
PTC MKS Toolkit for System Administrators
PTC MKS Toolkit for Developers
PTC MKS Toolkit for Interoperability
PTC MKS Toolkit for Professional Developers
PTC MKS Toolkit for Professional Developers 64-Bit Edition
PTC MKS Toolkit for Enterprise Developers
PTC MKS Toolkit for Enterprise Developers 64-Bit Edition
SEE ALSO
- Commands:
- filebox
Using the MKS KornShell
PTC MKS Toolkit 10.5 Documentation Build 40.