常用的bat

来源:互联网 发布:网络贷款怎么查询 编辑:程序博客网 时间:2024/06/05 18:27

1.修改无线IP地址

echo off
  cls
  title 设置无线IP
  echo 正在设置无线IP地址,请稍候……
  netsh interface ip set address "无线网络连接" static 192.168.1.213 255.255.255.0 192.168.1.254 1
  echo 正在更改DNS设置,请稍候……
  echo                       ******恭喜你,修改完成!无线IP地址:192.168.1.213******
  ::pause



2.设置自动获取IP地址

@echo off  
@echo 设置自动获取IP地址...  
netsh interface ip set address name="无线网络连接" source=dhcp  
@echo 设置自动获取DNS服务器地址...  
netsh interface ip set dns name="无线网络连接" source=dhcp  
@echo.  
@echo 设置完成。


3.windows 弹出提示框

@echo msgbox "提示信息!">msg.vbs 
@msg.vbs
@del msg.vbs


@echo msgbox "[$(ProjectName)]生成已完成!">msg.vbs 
@msg.vbs
@del msg.vbs


4.一键清理系统

@echo off 
echo 正在清除系统垃圾文件,请稍等...... 
del /f /s /q %systemdrive%\*.tmp 
del /f /s /q %systemdrive%\*._mp 
del /f /s /q %systemdrive%\*.log 
del /f /s /q %systemdrive%\*.gid 
del /f /s /q %systemdrive%\*.chk 
del /f /s /q %systemdrive%\*.old 
del /f /s /q %systemdrive%\recycled\*.* 
del /f /s /q %windir%\*.bak 
del /f /s /q %windir%\prefetch\*.* 
rd /s /q %windir%\temp & md %windir%\temp 
del /f /q %userprofile%\cookies\*.* 
del /f /q %userprofile%\recent\*.* 
del /f /s /q "%userprofile%\Local Settings\Temporary Internet Files\*.*" 
del /f /s /q "%userprofile%\Local Settings\Temp\*.*" 
del /f /s /q "%userprofile%\recent\*.*" 
echo 清除系统LJ完成! 
echo. & pause 



5.复制文件


set fullPath=E:\PLANTFORM\ZhiHe.SmartPlatform


::set PluginName=UserMgr
::set AreaName=ZhiHe.SmartPlatform.UserMgr


set PluginName=RoleAuthority
set AreaName=ZhiHe.SmartPlatform.RoleAuthority


::set WebPlginBinDirectory=%fullPath%\ZhiHe.SmartPlatform.Web\Plugins\%PluginName%\bin  
set WebPlginViewDirectory=%fullPath%\ZhiHe.SmartPlatform.Web\Plugins\%PluginName%\View     
::set WebPlginScriptDirectory=%fullPath%\ZhiHe.SmartPlatform.Web\Plugins\%PluginName%\Script    


::set PlginBinDirectory=%fullPath%\%AreaName%\bin  
set PluginViewDirectory=%fullPath%\%AreaName%\Views    
::set PluginScriptDirectory=$(SolutionDir)%AreaName%\Script  


::if not exist %WebPlginBinDirectory% md  %WebPlginBinDirectory%
::xcopy /s /y  %PlginBinDirectory% %WebPlginBinDirectory%


if not exist %WebPlginViewDirectory% md  %WebPlginViewDirectory%
xcopy /s /y %PluginViewDirectory% %WebPlginViewDirectory%


::pause



0 0
原创粉丝点击