中国DOS联盟论坛

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-09-23 14:47
47,812 topics / 349,917 posts / today 0 new / 48,273 members
DOS批处理 & 脚本技术(批处理室) » Help: Edit a batch file to run an application and automatically close the QQ.exe program
Printable Version  4,223 / 10
Floor1 kuangdafayin Posted 2005-08-05 15:21
初级用户 Posts 8 Credits 43
Help: Edit a batch file that automatically closes the QQ.exe program whenever an application (such as Word, Excel, AutoCAD, etc.) is started or run. The main purpose is that the subordinates in the company are not focused enough as they chat while working (of course, they can chat during leisure time), and they often make mistakes at work. Please help the experts.
Floor2 Climbing Posted 2005-08-05 16:02
铂金会员 Posts 2,753 Credits 6,962 From 河北保定
I think this is a matter of work attitude. If there is no regulation in the system that chatting is not allowed during work, no method can prevent the other party from chatting during work. For example, you close QQ, and he can open it again.
Floor3 kuangdafayin Posted 2005-08-05 17:33
初级用户 Posts 8 Credits 43
What you said is quite right! But for a female staff member, to be honest, there isn't much work to do. Just using the machine to draw pictures or make reports, such simple work still has mistakes. Just want her not to chat while working.
Floor4 Climbing Posted 2005-08-05 17:43
铂金会员 Posts 2,753 Credits 6,962 From 河北保定
Floor5 willsort Posted 2005-08-05 18:25
元老会员 Posts 1,512 Credits 4,432
Re Climbing:

  Brother's method is a bit of a joke. I actually think that if that staff member's computer skills are not high, you can use batch processing to rename the main program name of QQ or the QQ folder, and change it back when using it. This is much lower in technical difficulty than automatically monitoring QQ operation and closing it at any time, and it is also very feasible. I believe the original poster can make it himself.

  If that staff member is a computer expert, then the methods we can think of, she may also think of, so it is not safe. In this case, it seems that we can only think about it from the company's access server. Use the firewall to block the QQ port, and add other methods to monitor the 8080 port (I don't know the details specifically). If your company does not have a server, then unplugging the network cable during working hours may also be a clumsy method..
Floor6 Climbing Posted 2005-08-06 11:25
铂金会员 Posts 2,753 Credits 6,962 From 河北保定
If QQ is in the starting state, before changing the program name and folder name of QQ, you need to close the QQ process first. If in the XP environment, you can use taskkill. For other environments, you need to find some corresponding programs to close the process.
Floor7 kuangdafayin Posted 2005-08-06 21:15
初级用户 Posts 8 Credits 43
I wrote a batch file. It can close QQ when QQ is running and Word, Excel or other applications are started. But when Word, Excel or other applications are already running and then QQ is started, it doesn't work. Of course, the subordinate is not a master, and the computer level is average.
Floor8 willsort Posted 2005-08-08 12:38
元老会员 Posts 1,512 Credits 4,432
Re-enforcement:

It is possible to combine the process closing with directory renaming (or moving). That is, when starting an Office program, if QQ is running, close the process; if the QQ directory exists, rename or move it.

As for the timing of starting and restoring, you can choose after booting and before shutting down, but "task scheduler" support is required.
Floor9 brglng Posted 2005-08-08 12:42
银牌会员 Posts 466 Credits 1,200 From 上海
Programming? Maybe it's difficult with batch processing?
Floor10 pandawy Posted 2005-08-08 15:25
新手上路 Posts 5 Credits 7
Originally posted by kuangdafayin at 2005-8-5 15:21:
Help: Editing a batch file that automatically closes the QQ.exe program whenever an application (such as Word, Excel, AutoCAD, etc.) is started or run. The main purpose is that the subordinates in the company are not focused enough because they are chatting while working..


Can using the system's task scheduler, permission settings, and combined with batch processing to set it to prohibit running QQ during fixed time periods, and then automatically unlock during fixed time periods, work?
Floor11 electronixtar Posted 2005-11-13 17:49
铂金会员 Posts 2,672 Credits 7,493
[ Contact the Union admin team - 中国DOS联盟 - Standard version ]
Sponsored by ifanr Inc | © 2001–2023