|
Mnyoll
初级用户
 
积分 75
发帖 32
注册 2007-6-11
状态 离线
|
『楼 主』:
问个关于CMD可以显示计算机名的命令...
使用 LLM 解释/回答一下
找了很久没找到.....
想用NETSTAT命令又太慢了....
特来请教...
转移自 DOS学习入门 & 精彩文章 (教学室)
明显发错版块,因属论坛新手,故暂不予以扣分处理,但注册时间也有一年多了,应该对论坛有所熟悉了,望今后引起注意。
——管理员
Been looking for a long time and didn't find it.....
Want to use the NETSTAT command but it's too slow....
Come to ask for advice...
Moved from DOS Learning Introduction & Wonderful Articles (Teaching Room)
Clearly posted in the wrong section. Since it's a new forum user, no deduction is given for now, but the registration time is also over a year, so you should be familiar with the forum. Please pay attention in the future.
——Administrator
|

学习中 |
|
2008-11-14 11:17 |
|
|
Mnyoll
初级用户
 
积分 75
发帖 32
注册 2007-6-11
状态 离线
|
『第 2 楼』:
使用 LLM 解释/回答一下
是这样的....
我们知道PUBWIN里有以本机计算机名命名的进程....
比如计算机名为A001的它的进程就是A001.exe.....计算机名为A002的它的进程就是A002.exe
我现在想用BAT把这个进程干掉...
那个大哥可以帮帮忙???
This is like this....
We know that in PUBWIN there are processes named after the local computer name....
For example, if the computer name is A001, its process is A001.exe.... If the computer name is A002, its process is A002.exe
I now want to use BAT to kill this process...
Which big brother can help???
|

学习中 |
|
2008-11-14 12:11 |
|
|
yishanju
银牌会员
     [b]看你妹啊[/b]
积分 1488
发帖 1357
注册 2006-5-20
状态 离线
|
『第 3 楼』:
使用 LLM 解释/回答一下
呃,管理员都把帖子转错区了,还说别人
Uh, the administrator has moved the post to the wrong section and is still criticizing others.
|

有问题请发论坛或者自行搜索,再短消息问我的统统是SB |
|
2008-11-21 18:24 |
|
|
yishanju
银牌会员
     [b]看你妹啊[/b]
积分 1488
发帖 1357
注册 2006-5-20
状态 离线
|
『第 4 楼』:
使用 LLM 解释/回答一下
IPCONFIG /ALL
Host Name 后面就是计算机名
IPCONFIG /ALL
The host name is followed by the computer name
|

有问题请发论坛或者自行搜索,再短消息问我的统统是SB |
|
2008-11-21 18:36 |
|
|
yishanju
银牌会员
     [b]看你妹啊[/b]
积分 1488
发帖 1357
注册 2006-5-20
状态 离线
|
『第 5 楼』:
使用 LLM 解释/回答一下
系统本身有变量 %computername% 表示计算机名
echo %computername%
The system itself has a variable %computername% representing the computer name
echo %computername%
|

有问题请发论坛或者自行搜索,再短消息问我的统统是SB |
|
2008-11-21 18:42 |
|
|
yishanju
银牌会员
     [b]看你妹啊[/b]
积分 1488
发帖 1357
注册 2006-5-20
状态 离线
|
『第 6 楼』:
使用 LLM 解释/回答一下
刚刚发现 hostname.exe 命令也可以显示计算机名
I just now discovered that the hostname.exe command can also display the computer name
|

有问题请发论坛或者自行搜索,再短消息问我的统统是SB |
|
2008-11-21 19:22 |
|
|
DOSroot
管理员
         
积分 389
发帖 198
注册 2008-9-23
状态 离线
|
『第 7 楼』:
使用 LLM 解释/回答一下
Originally posted by yishanju at 2008-11-21 18:24:
呃,管理员都把帖子转错区了,还说别人
那你认为应该转到什么区
Originally posted by yishanju at 2008-11-21 18:24:
Well, the administrator also moved the post to the wrong section, and then blamed others
Then what do you think it should be moved to?
|
|
2008-11-21 20:14 |
|
|
HAT
版主
       
积分 9023
发帖 5017
注册 2007-5-31
状态 离线
|
『第 8 楼』:
使用 LLM 解释/回答一下
@echo off
for /f "skip=4 delims=" %%a in ('reg query HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\ComputerName\ActiveComputerName /v ComputerName') do (
set pcName=%%a
)
set pcName=%pcName:~24%
echo %pcName%
```@echo off
for /f "skip=4 delims=" %%a in ('reg query HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\ComputerName\ActiveComputerName /v ComputerName') do (
set pcName=%%a
)
set pcName=%pcName:~24%
echo %pcName%
```
|

 |
|
2008-11-23 12:41 |
|
|
HAT
版主
       
积分 9023
发帖 5017
注册 2007-5-31
状态 离线
|
『第 9 楼』:
使用 LLM 解释/回答一下
@echo off
for /f "tokens=2 delims==" %%a in ('wmic computersystem get name') do (
set pcName=%%a
)
echo %pcName%
```
@echo off
for /f "tokens=2 delims==" %%a in ('wmic computersystem get name') do (
set pcName=%%a
)
echo %pcName%
```
|

 |
|
2008-11-23 12:41 |
|
|
HAT
版主
       
积分 9023
发帖 5017
注册 2007-5-31
状态 离线
|
『第 10 楼』:
使用 LLM 解释/回答一下
@echo off
for /f "tokens=2 delims=\" %%a in ('net config server') do (
set pcName=%%a
)
echo %pcName%
```
@echo off
for /f "tokens=2 delims=\" %%a in ('net config server') do (
set pcName=%%a
)
echo %pcName%
```
|

 |
|
2008-11-23 12:44 |
|