![]() |
China DOS Union-- Unite DOS · Advance DOS · Grow DOS --Union site: www.cn-dos.net Forum site: www.cn-dos.net/forum |
| Guest | Log in | Register | Members | Search | China DOS Union |
|
中国DOS联盟论坛 The time now is 2026-08-04 14:13 |
48,038 topics / 350,123 posts / today 0 new / 48,251 members |
| DOS批处理 & 脚本技术(批处理室) » Batch script to end processes |
| Printable Version 2,149 / 6 |
| Floor1 daoshui18 | Posted 2007-05-11 15:00 |
| 初级用户 Posts 22 Credits 45 | |
|
─────────────────── Moderation Record ──────────────────── Executor: bjsh Original Title: Novice hopes for experts' guidance Description: Because the title is too vague, it is not convenient for forum search and management. Please modify the title within three days. Prompt: To modify the title, click Edit at the bottom right of the current post, and then click Edit Post after modification. Punishment: Since it is a new forum user, no punishment is temporarily given; if the title is not modified within three days, 2 points will be deducted as punishment, and the moderator will forcefully modify the title. Please click here to read the forum posting regulations or view The Wisdom of Asking Questions to avoid violating posting regulations in future discussions. ─────────────────── Moderation Record ──────────────────── This is a batch script I downloaded in the forum. For novices like me, I really hope experts can help us interpret it, so that I can learn faster than reading those boring commands. Please also ask all experts to be generous with your advice @echo off --------------- I've mixed this up for a long time and know what it means, which is not to display the command itself :1 -------------------------- Don't understand title End Process ----------- The title of cmd color f1 -------------------- The background color of the script mode con: cols=40 lines=18 --- I guess it's the size of the window! echo. ------------- Why is there a dot at the end set /p run=Please enter the program name to end -------- Please can you introduce it in detail ::ntsd -c q -pn %run% ------------- What does :: mean in front of the command taskkill /f /t /im %run% -------------- I know what this command means but don't know when connected with the front pause>nul I would like to thank you here first :) [ Last edited by daoshui18 on 2007-5-11 at 04:23 PM ] |
|
| Floor2 qingfushuan | Posted 2007-05-11 15:09 |
| 高级用户 Posts 327 Credits 502 | |
|
echo. -----------Blank line in the window
This P is actually a sentence: taskkill /f /t /im %run%---------Kill the process of %ren% It can also be forced to end with ntsd -c q -pn %run% ------------------Please enter ntsd /? in cmd set /p run=Please enter the program name to end ---------------------Enter set /? in cmd Declaration: I am not an expert, I have just been lurking in the forum for half a year, please forgive me for any details |
|
| Floor3 bjsh | Posted 2007-05-11 15:18 |
| 银牌会员 Posts 621 Credits 2,000 | |
|
: :1 --------------------------Don't understand
It's a label; Often used with goto and call; To achieve program jumping or similar function of functions; Output blank line: echo. set /p run=Please enter the program name to end It's the usage of set; set /p variable name=prompt string It's to output the prompt string and ask the user to input; And assign the input to the variable name; Describe in C language: Equivalent to: printf ("prompt string"); scanf("void",&variable name); Void represents any data type; because there is no distinction of data types under cmd; :: means comment; same as rem |
|
| Floor4 daoshui18 | Posted 2007-05-11 16:24 |
| 初级用户 Posts 22 Credits 45 | |
|
Moderator, I've made changes. Thanks a lot. Could you send me some materials about `set`? What I found on Baidu is always unclear. Haha
|
|
| Floor5 daoshui18 | Posted 2007-05-11 16:25 |
| 初级用户 Posts 22 Credits 45 | |
|
Thanks to the enthusiastic experts, I'm very motivated!
|
|
| Floor6 lxmxn | Posted 2007-05-11 16:42 |
| 版主 Posts 4,938 Credits 11,386 | |
Originally posted by daoshui18 at 2007-5-11 16:24: You need to learn to search by yourself~ http://www.cn-dos.net/forum/search.php?searchid=110022&orderby=lastpost&ascdesc=desc&searchsubmit=yes&sid=0UJaRC |
|
| Floor7 daoshui18 | Posted 2007-05-11 17:11 |
| 初级用户 Posts 22 Credits 45 | |
|
[ Contact the Union admin team -
中国DOS联盟 -
Standard version ] Sponsored by ifanr Inc | © 2001–2023 |