快速业务通道

不错的dos批处理命令详解第1/2页

作者 佚名 来源 批处理 浏览 发布时间 2013-07-09
etersifnullshowusage.
if{%1}=={}goto:Usage



:Remcodestart.
echo.
echo------------------------------------------------------
echo.
echoNowdeletingallthedefaultshares.
echo.
netshare%1$/delete
netshare%2$/delete
netshare%3$/delete
netshare%4$/delete
netshare%5$/delete
netshare%6$/delete
netshare%7$/delete
netshare%8$/delete
netshare%9$/delete
netstopServer
netstartServer
echo.
echoAlltheshareshavebeendeleteed
echo.
echo------------------------------------------------------
echo.
echoNowmodifytheregistrytochangethesystemdefaultproperties.
echo.
echoNowcreatingtheregistryfile
echoWindowsRegistryEditorVersion5.00>c:\delshare.reg
echo[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\lanmanserver\parameters]>>c:\delshare.reg
echo"AutoShareWks"=dword:00000000>>c:\delshare.reg
echo"AutoShareServer"=dword:00000000>>c:\delshare.reg
echoNowingusingtheregistryfiletochangthesystemdefaultproperties.
regedit/sc:\delshare.reg
echoDeletingthetemprotarilyfiles.
delc:\delshare.reg
goto:END



:Usage
echo.
echo------------------------------------------------------
echo.
echo☆Aexampleforbatchfile☆
echo☆[Usebatchfiletochangethesysytemshareproperties.]☆
echo.
echoAuthor:Ex4rch
echoMail:Ex4rch@hotmail.comQQ:1672602
echo.
echoError:Notenoughparameters
echo.
echo☆Pleaseenterthesharediskyouwannadelete☆
echo.
echoForinstance,todeletethedefaultshares:
echodelsharecdeipcadminprint
echo.
echoIfthedisklableisnotasC:D:E:,Pleasechangityouself.
echo.
echoexample:
echoIflocakdisklableareC:D:E:X:Y:Z:,youshouldchangthecommandinto:
echodelsharecdexyzipcadminprint
echo.
echo***youcandeleteninesharesonceinauseing***
echo.
echo------------------------------------------------------
goto:EOF



:END
echo.
echo------------------------------------------------------
echo.
echoOK,delshare.bathasdeletedalltheshareyouassigned.
echo.Anyquestions,feelfreetomailtoEx4rch@hotmail.com.
echo
echo.
echo------------------------------------------------------
echo.



:EOF
echoendofthebatchfile
------------------------cutherethensaveas.bator.cmdfile---------------------------




2.全面加固系统(给肉鸡打补丁)的批处理文件
------------------------cutherethensaveas.bator.cmdfile---------------------------



@echoWindowsRegistryEditorVersion5.00>patch.dll
@echo[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\lanmanserver\parameters]>>patch.dll



@echo"AutoShareServer"=dword:00000000>>patch.dll
@echo"AutoShareWks"=dword:00000000>>patch.dll
@REM[禁止共享]



@echo[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Lsa]>>patch.dll
@echo"restrictanonymous"=dword:00000001>>patch.dll
@REM[禁止匿名登录]



@echo[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\NetBT\Parameters]>>patch.dll
@echo"SMBDeviceEnabled"=dword:00000000>>patch.dll
@REM[禁止及文件访问和打印共享]



@echo[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\@REMoteRegistry]>>patch.dll
@echo"Start"=dword:00000004>>patch.dll
@echo[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControl

凌众科技专业提供服务器租用、服务器托管、企业邮局、虚拟主机等服务,公司网站:http://www.lingzhong.cn 为了给广大客户了解更多的技术信息,本技术文章收集来源于网络,凌众科技尊重文章作者的版权,如果有涉及你的版权有必要删除你的文章,请和我们联系。以上信息与文章正文是不可分割的一部分,如果您要转载本文章,请保留以上信息,谢谢!

分享到: 更多

Copyright ©1999-2011 厦门凌众科技有限公司 厦门优通互联科技开发有限公司 All rights reserved

地址(ADD):厦门软件园二期望海路63号701E(东南融通旁) 邮编(ZIP):361008

电话:0592-5908028 传真:0592-5908039 咨询信箱:web@lingzhong.cn 咨询OICQ:173723134

《中华人民共和国增值电信业务经营许可证》闽B2-20100024  ICP备案:闽ICP备05037997号