Batch Processing pop-up prompts and playing sounds, batch processing pop-up sounds
I. pop-up window
1. msg command
Msg % username % "Hello! "
2. mshta Program
(1) Use the msgbox function of vbsript
Mshta vbscript: msgbox ("Hello! ", 64," window ") (window. close)
(2) popup Method Using vbscript
Mshta vbscript: CreateObject ("Wscript. Shell"). popup ("Hello", 7, "window", 64) (window. close)
(3) alert method using javascript
Mshta javascript: window. alert ("Hello"); window. close ()
(4) using the javascript popup Method
Mshta "javascript: new ActiveXObject ('wscript. shell'). popup ('Hello! ', 7, 'windows', 64); window. close ();"
(5) confirm method of javascript
Mshta javascript: confirm ("ha"); window. close ()
(6) execScript method of javascript -- alert
Mshta vbscript: window.exe cScript ("alert ('Hello world! '); "," Javascript ")
(7) execScript method of javascript -- msgBox
Mshta javascript: window.exe cScript ("msgBox ('Hello world! '): Window. close "," vbs ")
(8) execute method of javascript
Mshta vbscript: execute ("msgbox" "one BOX" ": msgbox" "two BOX": window. close ")
Ii. Playing Sound
1. mshta Program
Mshta vbscript: createobject ("sapi. spvoice"). speak ("I am a person! ") (Window. close)
Iii. Notes
1. ping-n 1 127.1> nul
(1) ping is a network command to test network connectivity. The parameter "-n 1" indicates that only one ICMPS packet is sent to test network connectivity.
(2) 127.1 indicates that the local machine retains the IP address, which is 127.0.0.1. ping 127.1 indicates that the machine is ping127.0.0.1. You can test whether the NIC and TCP/IP protocols are properly installed and working.
(3) "> nul" indicates redirecting the screen display information generated by the Command (>) to an empty device (nul ), in this way, the ping command execution result is not displayed on the screen.> Nul is to shield the display of standard output on the screen, 2> nul is to block error display, and "> nul 2> nul" is to block the screen display whether it is right or wrong.
It is generally used for delay in batch processing. This is not a timing command at all. It cannot "display timing", but it takes about one second to run this command .. it can be simplified to ping-n 2 127.1> nul, and two other 0 commands are automatically added when running.> nul does not display the ping command execution result. /n defines the number of sent packets. It takes about 1 second to send two packets, but this time is not accurate .. 127.0.0.1 is a local ip address, no matter whether there is a network connection, as long as there is a NIC on the computer this ip address exists, often use this ping command to test whether the NIC is intact ..
2. Control
(1) Pause batch processing: directly press the Pause key on the disk
(2) Terminate the batch processing: Ctrl + C. However, sometimes it seems that the response is not very positive...
Iv. User Interaction
1. color command: Set the background color and font color of the window. Use color /? View
2. mode command: Set the window size "mode con [COLS = c] [LINES = n]", cols is the width, and lines is the height.
3. msg command: GUI interaction window. For details, see msg /?.
Batch Processing
Start wmplayer audio file path
After the batch processing is complete, a window prompt is displayed.
@ Echo off
Start mshta vbscript: msgbox ("uninstalled", 0, "GHOST uninstall program") (window. close)
Save it as. bat and check it out ..
You can add the above Code after. BAT.