![]() |
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-18 02:55 |
47,814 topics / 349,907 posts / today 4 new / 48,259 members |
| DOS疑难解答 & 问题讨论 (解答室) » How to query whether a certain computer in the local area network is running a certain program (or port) |
| Printable Version 2,358 / 4 |
| Floor1 namejm | Posted 2006-04-25 01:24 |
| 荣誉版主 Posts 1,737 Credits 5,226 From 成都 | |
|
Here's the translation:
The situation is like this: I and my colleagues have three computers, connected through a HUB, sharing a broadband account to access the internet through a proxy software. All three computers are on XP operating system, and both the server and client of the proxy software are installed. Whoever boots up first uses the account to log in. Others need to start the client to connect to the computer that has the server started. It's often one computer after another to try, to see who has started the server. If none have started, then one has to log in with the account oneself, which is very tedious. Now I want to use a batch program, without third-party software, to automatically judge the running situation of the server. The key step is to query whether a certain program (such as server.exe) is running on a certain computer, or whether a certain port (such as 123) is open. How to program this? |
|
| Floor2 a9319751 | Posted 2006-04-25 08:05 |
| 中级用户 Posts 170 Credits 439 | |
|
Scan the 18201 port of the machine 127.16.3.1. If "udp closed" is found to be closed, display A01 to C:\a.txt
|
|
| Floor3 namejm | Posted 2006-04-25 08:25 |
| 荣誉版主 Posts 1,737 Credits 5,226 From 成都 | |
Originally posted by a9319751 at 2006-4-25 08:05: After running in the cmd command line, it prompts that 'namp' is not an internal or external command, nor is it a runnable program or batch file. Is nmap not a cmd command on XP? |
|
| Floor4 3742668 | Posted 2006-04-25 14:06 |
| 荣誉版主 Posts 718 Credits 2,013 | |
|
It is difficult for cmd to achieve port-level applications without borrowing third-party tools. But what proxy software are you using? Doesn't the client automatically search and connect? It is suggested that you find one that can automatically search to use.
In addition, I don't know the working principle of the proxy software you are using, otherwise the purpose can be achieved pertinently. It is suspected that the key should be to change the gateway. Without its client, you can use netsh to get it done. The following is a VBS script to judge whether the other party has enabled a certain port: Save it as "Check Port.vbs" and then run it. The MSWinsock control needs to be registered. |
|
| Floor5 namejm | Posted 2006-04-25 21:48 |
| 荣誉版主 Posts 1,737 Credits 5,226 From 成都 | |
Originally posted by 3742668 at 2006-4-25 14:06: Using ccproxy and e-border driver combination |
|
|
[ Contact the Union admin team -
中国DOS联盟 -
Standard version ] Sponsored by ifanr Inc | © 2001–2023 |