永久删除默认共享.bat

永久删除默认共享.bat

开启

@echo off
net start Server
net share c$=c:/
net share d$=d:/
net share e$=e:/
net share f$=f:/
net share admin$
net share ipc$
echo Windows Registry Editor Version 5.00> c:/delshare.reg
echo [HKEY_LOCAL_MACHINE/SYSTEM/CurrentControlSet/Services/lanmanserver/parameters]>> c:/delshare.reg
echo "AutoShareWks"=dword:00000001>> c:/delshare.reg
echo "AutoShareServer"=dword:00000001>> c:/delshare.reg
regedit /s c:/delshare.reg
del c:/delshare.reg

删除

@echo off
net stop Server
net share c$ /delete
net share d$ /delete
net share e$ /delete
net share f$ /delete
net share admin$ /delete
net share ipc$ /delete
net start Server
echo Windows Registry Editor Version 5.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
regedit /s c:/delshare.reg
del c:/delshare.reg


原来

@echo off
Color 0A
cls
echo ------------------------
echo 删除当前的系统共享目录
echo ------------------------
pause
net stop Server
net share c$ /delete
net share d$ /delete
net share e$ /delete
net share f$ /delete
net share admin$ /delete
net share ipc$ /delete
net start Server
cls
echo 注意
echo ------------------------
echo   共享目录全部删除完毕  
echo ------------------------
echo   下面将修改注册表项  
echo    
echo   关闭系统默认共享属性  
echo ------------------------
pause
echo 生成 delshare.reg 准备修改注册表
echo Windows Registry Editor Version 5.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
echo 运行 delshare.reg 修改注册表
regedit /s c:/delshare.reg
echo 删除 delshare.reg 临时文件
del c:/delshare.reg
cls
echo 注意
echo ----------------------
echo   共享漏洞修补完成  
echo ----------------------

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值