Win7 calls the system popup command and how to reference the current time

Run the following command under dos

msg  %username% /time:15  The whole point to remind.it's time: %time%.

 

dos command pop-up dialog box---Detailed explanation of Msg command

 

Execute under cmd:

::: A dialog box will pop up on the desktop of the current user, displaying the word haha, and it will automatically close after ten seconds

::%usename% is a system environment variable, table current user name

msg %username% /time:10 haha

:: means to send the message Hello to all users (*) of the 192.168.1.100 ip machine in the local area network, of course, it can also be your own ip, or a specific user name, such as xiao

MSG /server:192.168.1.100 * "Hello"

:: The table sends information to the user xiao on this system, the content is the entire content of the 1.txt file

MSG xiao  < 1.txt

 

 

DOS Command Encyclopedia: Detailed Msg Command

Send a message to the user. The information will pop up in a prompt box

MS-DOS Command Syntax

msg {UserName|SessionName|SessionID|@FileName|*} [/server:ServerName] [/time:seconds] [/v] [/w] [message]

MS-DOS command parameters

UserName
The name of the user to receive the message.
SessionName
The name of the session to receive the message.
SessionID
The numeric ID of the session whose users want to receive messages.
@FileName
Identifies a file containing a list of usernames, session names, and session IDs that are to receive messages.
*
Send the message to all users in the system.
/server:ServerName
Specifies the terminal server to which the session or user to receive the message belongs. If not specified, /server will use the server you are currently logged in to.
/time:seconds
Specifies how long the messages you send are displayed on the user's screen. Once it expires, the message disappears from the screen. If no period is set, the message will remain on the user's screen until the user sees the message and clicks OK.
/v
Displays information about the action to be performed.
(i.e. output something like
"Send message to Session Console with display time 60"
"Message sent to Session Console received user response"
and other information, the information indicating the operation process and results is output)
/w
Wait for confirmation from the user that the message has been received. If the user does not respond immediately, use the /time:seconds parameter to avoid possible long delays. It is also helpful to use this parameter with /v.
message
The body of the message to be sent. If no message is typed, you will be prompted for a message or read from standard input (STDIN). To send a message contained in a file, type a less than sign (<) followed by the file name.
/?
Display help at the command prompt.

MS-DOS Command Comments

  • If the user or session name is not specified, msg will display an error message. When specifying the name of the session, it must be a valid name.
  • A user must have permission to send a message to send a message.

MS-DOS Command Examples

To send a message titled Let's meet at 1PM today to all sessions of user MIKES, type:

msg MIKES Let's meet at 1PM today

To send the same message to session MODEM02, type:

msg modem02 Let's meet at 1PM today

To send a message to conversation 12, type:

msg 12 Let's meet at 1PM today

To send a message to all sessions contained in the file USERLIST, type:

msg @userlist Let's meet at 1PM today

To send a message to all logged in users, type:

msg * Let's meet at 1PM today

To send a message to all users within the confirmation timeout (for example, 10 seconds), type:

msg * /TIME:10 Let's meet at 1PM today

Guess you like

Origin http://10.200.1.11:23101/article/api/json?id=326570907&siteId=291194637