China DOS Union

-- Unite DOS · Advance DOS · Grow DOS --

Union site: www.cn-dos.net Forum site: www.cn-dos.net/forum
DOS stands for freedom, openness and progress. Let us work hard, learn from the openness and GNU spirit of FreeDOS and Linux, and together build and grow a free GNU GPL world!

中国DOS联盟论坛
The time now is 2026-08-01 13:47
中国DOS联盟论坛 » DOS批处理 & 脚本技术(批处理室) » Help: Edit a batch file to run an application and automatically close the QQ.exe program View 4,124 Replies 10
Original Poster Posted 2005-08-05 15:21 ·  中国 宁夏 吴忠 青铜峡市 电信
初级用户
Credits 43
Posts 8
Joined 2005-08-05 15:19
20-year member
UID 41374
Status Offline
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.
Floor 2 Posted 2005-08-05 16:02 ·  中国 河北 石家庄 联通
铂金会员
★★★★
网络独行侠
Credits 6,962
Posts 2,753
Joined 2003-04-16 00:00
23-year member
UID 1565
Gender Male
From 河北保定
Status Offline
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.
偶只喜欢回答那些标题和描述都很清晰的帖子!
如想解决问题,请认真学习“这个帖子”和“这个帖子”并努力遵守,如果可能,请告诉更多的人!
Floor 3 Posted 2005-08-05 17:33 ·  中国 宁夏 银川 电信
初级用户
Credits 43
Posts 8
Joined 2005-08-05 15:19
20-year member
UID 41374
Status Offline
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.
Floor 4 Posted 2005-08-05 17:43 ·  中国 河北 石家庄 联通
铂金会员
★★★★
网络独行侠
Credits 6,962
Posts 2,753
Joined 2003-04-16 00:00
23-year member
UID 1565
Gender Male
From 河北保定
Status Offline
偶只喜欢回答那些标题和描述都很清晰的帖子!
如想解决问题,请认真学习“这个帖子”和“这个帖子”并努力遵守,如果可能,请告诉更多的人!
Floor 5 Posted 2005-08-05 18:25 ·  中国 山西 大同 中移铁通
元老会员
★★★★
Batchinger
Credits 4,432
Posts 1,512
Joined 2002-10-18 00:00
23-year member
UID 19
Gender Male
Status Offline
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..
※ Batchinger 致 Bat Fans:请访问 批处理编程的异类 ,欢迎交流与共享批处理编程心得!
Floor 6 Posted 2005-08-06 11:25 ·  中国 河北 石家庄 联通
铂金会员
★★★★
网络独行侠
Credits 6,962
Posts 2,753
Joined 2003-04-16 00:00
23-year member
UID 1565
Gender Male
From 河北保定
Status Offline
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.
偶只喜欢回答那些标题和描述都很清晰的帖子!
如想解决问题,请认真学习“这个帖子”和“这个帖子”并努力遵守,如果可能,请告诉更多的人!
Floor 7 Posted 2005-08-06 21:15 ·  中国 宁夏 银川 电信
初级用户
Credits 43
Posts 8
Joined 2005-08-05 15:19
20-year member
UID 41374
Status Offline
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.
Floor 8 Posted 2005-08-08 12:38 ·  中国 山西 运城 中移铁通
元老会员
★★★★
Batchinger
Credits 4,432
Posts 1,512
Joined 2002-10-18 00:00
23-year member
UID 19
Gender Male
Status Offline
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.
※ Batchinger 致 Bat Fans:请访问 批处理编程的异类 ,欢迎交流与共享批处理编程心得!
Floor 9 Posted 2005-08-08 12:42 ·  中国 上海 徐汇区 电信
银牌会员
★★★
永遠的DOS~~~
Credits 1,200
Posts 466
Joined 2005-02-01 00:00
21-year member
UID 35867
Gender Male
From 上海
Status Offline
Programming? Maybe it's difficult with batch processing?
32位才是DOS未来的希望
个人网志:http://sololand.moe
Floor 10 Posted 2005-08-08 15:25 ·  中国 山东 泰安 肥城市 联通
新手上路
Credits 7
Posts 5
Joined 2005-08-08 15:18
20-year member
UID 41450
Gender Male
Status Offline
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?
Floor 11 Posted 2005-11-13 17:49 ·  IANA 局域网IP(Private-Use)
铂金会员
★★★★
Credits 7,493
Posts 2,672
Joined 2005-09-02 00:00
20-year member
UID 42173
Gender Male
Status Offline
Forum Jump: