Just show up:
The code is as follows |
Copy Code |
::=============== @echo off WMIC process where name= "explorer.exe" Get Handle Pause ::=============== |
Pass to Variable:
The code is as follows |
Copy Code |
::=============== @echo off for/f "Skip=1"%%i in (the ' WMIC process where ' name= ' explorer.exe ' "Get Handle ') do ( Echo%%i) Pause ::=============== |
WMIC process where name= "explorer.exe" Get Handle
is a WMIC query statement:
WMIC is a command-line management system that is brought up by Windows systems to manage systems that can be specifically helped by:
Open cmd, and then enter WMIC/?
Process is a class in WMIC that contains management of system processes.
Where is the WMIC conditional statement,
Get handle is the statement that gets the PID.
The
Skip=1 is a parameter under the batch for loop/F command, with a simple few words to explain the batch for/f command, if you want to learn, you have to spend Kung fu learning.
Suggestions: Want to learn batch processing can not rely solely on the individual command, the system of learning, mastered the method of natural simple, recommended to the batch of home and other professional batch processing forum or Web site System learning