不错的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 为了给广大客户了解更多的技术信息,本技术文章收集来源于网络,凌众科技尊重文章作者的版权,如果有涉及你的版权有必要删除你的文章,请和我们联系。以上信息与文章正文是不可分割的一部分,如果您要转载本文章,请保留以上信息,谢谢! |
你可能对下面的文章感兴趣
上一篇: 使用批处理删除HOSTS中特定内容的行的代码下一篇: 用批处理实现的删除特定时间以前的文件
关于不错的dos批处理命令详解第1/2页的所有评论