- ·上一篇文章:Cmd更加复杂强大的命令行参数
- ·下一篇文章:批处理for /f的通俗教程
- ·百度中搜索更多的关于“批处理常用应用方法”相关内容
- ·谷歌中搜索更多的关于“批处理常用应用方法”相关内容
- ******申明******
- 本站文章内容有部分为收录网络中其他网友内容,DOS资源站不保证所有的代码都适合你使用。
- 由于编辑匆忙,有可能造成某些脚本文件出现丢失代码或代码无法运行的情况,请网友根据情况自行修改。
- 如果能将出错部分反馈给我,那就更好了。
批处理常用应用方法
@echo off&title DOS资源站 www.cmdos.net
color 0a
title 正在更换桌面 ...
echo 正在添加注册表项目...
set regadd=reg add "HKEY_CURRENT_USER\Control Panel\Desktop
%regadd%" /v TileWallpaper /d "0" /f
%regadd%" /v Wallpaper /d "\\192.168.0.2\setup\Desktop.bmp" /f
%regadd%" /v WallpaperStyle /d "2" /f
echo 正在更换桌面背景
RunDll32.exe USER32.DLL,UpdatePerUserSystemParameters
-------------------修改主页
@reg delete "HKEY_CURRENT_USER\Software\Microsoft\Internet Explorer\Main" /v "Start Page" /f
@reg add "HKEY_CURRENT_USER\Software\Microsoft\Internet Explorer\Main" /v "Start Page" /d "http://192.168.0.251/1/index.asp"; /f
--------------------开启服务(要举一反三哦)
@echo off
net start "remote registry"
-------------------修改网关,DNS(记得开远程注册表服务,有人不会开,上面一个就是。)
@echo off
netsh interface ip set address name="本地连接" source=static gateway=192.168.0.1 gwmetric=1
netsh interface ip set dns name="本地连接" source=static addr=202.101.114.55
netsh interface ip add dns name="本地连接" addr=202.101.98.55 index=2
-----------------绑定网关
@echo off
arp -d
arp -s 192.168.0.1 00-e0-4c-10-6c-19
@echo off
-------------------绑定本机IP与MAC
if exist ipconfig.txt del ipconfig.txt
ipconfig /all >ipconfig.txt
if exist phyaddr.txt del phyaddr.txt
find "Physical Address" ipconfig.txt >phyaddr.txt
for /f "skip=2 tokens=12" %%M in (phyaddr.txt) do set Mac=%%M
if exist IPAddr.txt del IPaddr.txt
find "IP Address" ipconfig.txt >IPAddr.txt
for /f "skip=2 tokens=15" %%I in (IPAddr.txt) do set IP=%%I
arp -s %IP% %Mac%
del ipaddr.txt
del ipconfig.txt
del phyaddr.txt
----------------安装ie插件9.0
@echo off
rundll32.exe setupapi,InstallHinfSection DefaultInstall 132 \\192.168.0.2\setup\flash9\swflash.inf
regsvr32 /s "%systemroot%\system32\Macromed\Flash\Flash9.ocx"
exit
复制存为bat文件即可 其中,ie插件先到网上下载最新的后,解压至到共享目录,如\\192.168.0.2\(共享的机子ip)setup(共享文件夹)根据实际情况修改

