咨询电话:010-82823766

黑客教程系列-简明批处理(16)
  • 2008-5-14 12:27:21
  • 发表时间:
  • 浏览次数:
  • 本站原创
  • 文章来源:
  • 阿杰
  • 作者:

六.精彩实例放送。

  1.删除win2k/xp系统默认共享的批处理

  ------------------------ cut here then save as .bat or .cmd file ---------------------------

  @echo preparing to delete all the default shares.when ready pres any key.

  @pause

  @echo off

  :Rem check parameters if null show usage.

  if {%1}=={} goto :Usage

  :Rem code start.

  echo.

  echo ------------------------------------------------------

  echo.

  echo Now deleting all the default shares.

  echo.

  net share %1$ /delete

  net share %2$ /delete

  net share %3$ /delete

  net share %4$ /delete

  net share %5$ /delete

  net share %6$ /delete

  net share %7$ /delete

  net share %8$ /delete

  net share %9$ /delete

  net stop Server

  net start Server

  echo.

  echo All the shares have been deleteed

  echo.

  echo ------------------------------------------------------

  echo.

  echo Now modify the registry to change the system default properties.

  echo.

  echo Now creating the registry file

  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 Nowing using the registry file to chang the system default properties.

  regedit /s c:\delshare.reg

  echo Deleting the temprotarily files.

  del c:\delshare.reg

  goto :END

top
推荐导读
推荐导读
bottom
top
热门文章
热门文章
bottom