快速业务通道

批处理文件制作实例精彩教程第1/5页

作者 佚名 来源 批处理 浏览 发布时间 2013-07-09

@regedit/spatch.dll
@deletepatch.dll

@REM[删除DSNXDE在注册表中的启动项,用sc.exe将之注册为系统关键性服务的同时将其属性设为隐藏和只读,并config为自启动]
@REM这样不是更安全^_^.
六.精彩实例放送。
1.删除win2k/xp系统默认共享的批处理
------------------------cutherethensaveas.bator.cmdfile---------------------------


@echopreparingtodeleteallthedefaultshares.whenreadypresanykey.
@pause
@echooff

:Remcheckparametersifnullshowusage.
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.全面加固系统(给肉鸡打补丁)的批处理文件
@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

凌众科技专业提供服务器租用、服务器托管、企业邮局、虚拟主机等服务,公司网站: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号