永久删除默认共享.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 ----------------------