|
slzzj
新手上路

积分 2
发帖 1
注册 2007-6-23
状态 离线
|
『第 91 楼』:
使用 LLM 解释/回答一下
非常感谢,正需要这样的东西。
Thanks a lot. Just what I needed.
|
|
2007-6-23 21:12 |
|
|
gmsx007
初级用户
 
积分 75
发帖 36
注册 2007-5-11
状态 离线
|
『第 92 楼』:
先谢了
使用 LLM 解释/回答一下
好东西大家分享,大家研究!
Good things are shared by everyone, and everyone studies them!
|
|
2007-7-2 04:30 |
|
|
helixgentoo
新手上路

积分 2
发帖 1
注册 2007-7-5
状态 离线
|
|
2007-7-5 02:56 |
|
|
ssay
新手上路

积分 10
发帖 5
注册 2007-6-27
状态 离线
|
『第 94 楼』:
使用 LLM 解释/回答一下
请教楼主及诸位达人:
在楼主的代码中:
for /f "tokens=12 delims= " %%i in ('ipconfig /all^|find /i "Physical Address"') do (
set mac=%%i
set mac=!mac:~0,-1!
)
其中!mac:~0,-1!是什么意思啊?
很久以前学过批处理,但学的很肤浅。查了一些资料,在lxmxn版主的文章中提到:
! !
① 当启用变量延迟时,使用!!将变量名扩起来表示对变量值的引用。
但对!mac:~0,-1!还是推测不出是什么作用。
请不吝赐教!拜谢!
Ask the LZ and all the experts:
In the LZ's code:
for /f "tokens=12 delims= " %%i in ('ipconfig /all^|find /i "Physical Address"') do (
set mac=%%i
set mac=!mac:~0,-1!
)
What does!mac:~0,-1! mean?
I learned batch processing a long time ago, but very superficially. I checked some materials, and in the article by moderator lxmxn, it is mentioned:
! !
① When variable delay is enabled, using!! to enclose the variable name means to reference the variable value.
But I still can't infer the function of!mac:~0,-1!.
Please be generous to give your advice! Thanks a lot!
|
|
2007-7-5 11:09 |
|
|
qasa
高级用户
   
积分 959
发帖 311
注册 2006-4-11 来自 广东-LianJiang
状态 离线
|
『第 95 楼』:
使用 LLM 解释/回答一下
!mac:~0,-1!
提取 mac 变量的所有字符,除了最后一个。
你可以用
set /?
来看一下。
Last edited by qasa on 2007-7-7 at 01:40 AM ]
!mac:~0,-1!
Extract all characters of the mac variable except the last one.
You can use
set /?
to take a look.
Last edited by qasa on 2007-7-7 at 01:40 AM ]
|

κχυμγνξοθπρωψιαδλεηφβτζσ┬╀┾┳┞┯┰┱┣┲┳╂╁│├┟┭┠这是什么??这就是我的人生 |
|
2007-7-7 01:38 |
|
|
wzw528
新手上路

积分 2
发帖 1
注册 2007-7-8
状态 离线
|
|
2007-7-8 21:09 |
|
|
beyoungse
中级用户
  
积分 253
发帖 112
注册 2005-12-20
状态 离线
|
|
2007-7-12 22:40 |
|
|
oioc
初级用户
 
积分 34
发帖 15
注册 2007-5-1
状态 离线
|
『第 98 楼』:
使用 LLM 解释/回答一下
???:lol::lol::lol:
Last edited by oioc on 2007-7-13 at 06:22 AM ]
????:lol::lol::lol:
Last edited by oioc on 2007-7-16 at 06:22 AM ]
|
|
2007-7-13 06:18 |
|
|
429499381
中级用户
  
积分 452
发帖 202
注册 2006-12-21
状态 离线
|
『第 99 楼』:
提个建议
使用 LLM 解释/回答一下
其实我早就知道有这个工具, 一直没有用, 现在网吧马上要换系统了, 刚好试验一下 不过再这之前希望你能改进一下其全自动功能!!
你的MAC文件里面的数据格式能不能改为像啊D工具包里面扫描出来的格式一样, 这样就不用一个个去该格式了, 或者你直接在写个批处理扫描MAC ,IP, 计算机名。
其实我也会, 只不过需要花时间, 我没你技术好, 所以如果你不想做的话, 我还是花点时间做出来, 跟你的工具配合, 真正达到全自动!!!
Actually, I already knew about this tool a long time ago, but I haven't used it. Now the internet café is about to change the system, so it's just right to test it. However, before that, I hope you can improve its fully automatic function!
Can the data format in your MAC file be changed to be like the format scanned out in the A-D tool kit? That way, there's no need to change the format one by one, or you can directly write a batch script to scan MAC, IP, and computer name.
Actually, I can also do it, but it will take time. I'm not as skilled as you, so if you don't want to do it, I'll spend some time making it and integrate it with your tool to truly achieve full automation!!!
|
|
2007-7-13 07:34 |
|
|
myname1994
初级用户
 
积分 65
发帖 30
注册 2005-11-11
状态 离线
|
『第 100 楼』:
使用 LLM 解释/回答一下
不错.我还正想在假期里写一个的呢.用于机房管理.
Not bad. I was just thinking about writing one during the holiday. For computer lab management.
|
|
2007-7-13 08:40 |
|
|
luowei14
初级用户
 
积分 193
发帖 98
注册 2007-1-17
状态 离线
|
|
2007-7-13 11:10 |
|
|
ncqingyi
初级用户
 
积分 24
发帖 11
注册 2007-7-13
状态 离线
|
『第 102 楼』:
使用 LLM 解释/回答一下
setlocal enabledelayedexpansion
这条命令是重中之中的.
另外,改计算机名,可以使用WMIC的方式.
setlocal enabledelayedexpansion
This command is of utmost importance.
Additionally, to change the computer name, you can use the WMIC method.
|

Black/White
Mono
CGA
VGA
SVGA
LCD
十年工龄 For disk operation system |
|
2007-7-13 12:19 |
|
|
ncqingyi
初级用户
 
积分 24
发帖 11
注册 2007-7-13
状态 离线
|
『第 103 楼』:
使用 LLM 解释/回答一下
Originally posted by 5639863 at 2007-6-18 11:29 AM:
嗯 ,确实很厉害,但现在我发现目前大部分这种工具都能不修改类似于本地连接2或本地连接3一类的连接!不过这个工具已经很大的方便网管了
配置或更新IP地址:
wmic nicconfig where index=0 call enablestatic("192.168.1.5"), ("255.255.255.0")
;index=0说明是配置网络接口1。 index=1 就改第二个.
配置网关(默认路由):
wmic nicconfig where index=0 call setgateways("192.168.1.1"),(1)
下面是我这二的网卡列表,只有第一个是的,其他都不是.
Broadcom NetXtreme 57xx
RAS 同步适配器
数据包计划程序微型端口
WAN 微型端口 (L2TP)
WAN 微型端口 (PPTP)
WAN 微型端口 (PPPOE)
直接并行
WAN 微型端口 (IP)
数据包计划程序微型端口
WAN 微型端口 (IPX)
再使用WMIC 来做 Output 就可以实现自己判断了。
Originally posted by 5639863 at 2007-6-18 11:29 AM:
Well, it's really powerful, but now I find that most of these tools can not modify connections like Local Area Connection 2 or Local Area Connection 3! But this tool has greatly facilitated network administrators
Configure or update IP address:
wmic nicconfig where index=0 call enablestatic("192.168.1.5"), ("255.255.255.0")
; index=0 means to configure network interface 1. index=1 means to modify the second one.
Configure gateway (default route):
wmic nicconfig where index=0 call setgateways("192.168.1.1"),(1)
The following is the list of my two network cards, only the first one is, the others are not.
Broadcom NetXtreme 57xx
RAS Synchronous Adapter
Packet Scheduler Miniport
WAN Miniport (L2TP)
WAN Miniport (PPTP)
WAN Miniport (PPPOE)
Direct Parallel
WAN Miniport (IP)
Packet Scheduler Miniport
WAN Miniport (IPX)
Then use WMIC to do Output to achieve self-judgment.
|

Black/White
Mono
CGA
VGA
SVGA
LCD
十年工龄 For disk operation system |
|
2007-7-13 12:25 |
|
|
ask5
新手上路

积分 2
发帖 1
注册 2006-10-11
状态 离线
|
|
2007-7-13 14:19 |
|
|
qasa
高级用户
   
积分 959
发帖 311
注册 2006-4-11 来自 广东-LianJiang
状态 离线
|
『第 105 楼』:
使用 LLM 解释/回答一下
回97楼和104楼,这样的问题早已解决,其实也很简单的,不管你是本地连接1、本地连接2、本地连接3......都可以的,现附代码给大家看看。
......
for /f "tokens=1 delims=" %%s in ('ipconfig /all^|find /i "Ethernet adapter"') do (set ss_=%%s)
set ss_=%ss_:~17,-2%
netsh interface IP Set Address "%ss_%" Static %2 %zwym_% %workgate_% 1 >nul
......
Reply to post 97 and post 104, such problems have long been solved, and it's actually very simple. Whether you are Local Area Connection 1, Local Area Connection 2, Local Area Connection 3...... it's all okay. Now attach the code for everyone to see.
......
for /f "tokens=1 delims=" %%s in ('ipconfig /all^|find /i "Ethernet adapter"') do (set ss_=%%s)
set ss_=%ss_:~17,-2%
netsh interface IP Set Address "%ss_%" Static %2 %zwym_% %workgate_% 1 >nul
......
|

κχυμγνξοθπρωψιαδλεηφβτζσ┬╀┾┳┞┯┰┱┣┲┳╂╁│├┟┭┠这是什么??这就是我的人生 |
|
2007-7-26 15:55 |
|