天极Yesky
  • 笔记本电脑
    笔记本
  • 台式电脑
    台式机
  • 手机
    手机
  • 电脑硬件DIY
    DIY硬件
  • CPU
    主板
    音箱
  • 硬盘
    显卡
    键鼠
  • 内存光驱
    显示器
    机箱电源

  • 数码相机DC
    数码相机
  • MP3播放器
    MP3/MP4
  • 数码摄像机DV
    摄像机
  • 电脑外设
    外设
  • 网络
    网络
  • 服务器
    服务器
  • 数字家庭
    数字家庭
  • 群乐
    群乐
  • 产品报价 行情 经销商 渠道 评测 | 软件 设计 网页 开发 安全 论坛 E时代 游戏 图片 壁纸 下载 网摘 博客 索尼专区 Vista 科技奥运
    天极网
    停止登录脚本将服务器当作客户机
    作者: David Pye
    出处: TechTarget
    责任编辑: 刘伟
    [ 2004-06-17 19:34 ]


    This tip was submitted to the SearchWin2000 Tip Exchange by member Michael Corkery. Let other users know how useful it is by rating the tip below.


    There's a simple way to stop your logon script from making unwanted changes on your NT/2000/XP servers that were designed for your clients (mapping drives and printers, making registry changes, setting policies, etc).

    1. Right-click the .bat file stored in the "C:WINNTsystem32ReplExportScripts" folder on your PDC (usually called "logon.bat," but can be any name,) and select "Edit." The file opens in Notepad.

    You should include the following three lines as close to the start of the file as possible - ideally just below the first "@echo off" -- before any commands are run or any of the .kix files are called:

  • REM (This breaks servers out of the logon script.)
  • @echo off
  • if exist systemrootlanma256.bmp goto SERVEREND

    Then append to the very end of the file (after the normal exit command for clients) the following:

  • :serverend
  • REM (This exits the LOGON batch file if a server logs in.)
  • @echo This is a Server, aborting logon
  • exit

    How this works is simple -- on Windows NT or higher, all servers have the server graphic "lanma256.bmp" in the systemroot folder (which means that even if it's not installed on the C: partition, it will still work). The clients have the file "winnt256.bmp." Pre-NT Windows clients are OK too, as they do not have the server graphic that is the condition for breaking the script.

    As always, backup the original "logon.bat" file before making any changes, and test the new script before putting it back on the PDC to replicate. Hope this helps!

  • 笔名:
    请您注意:

     遵守国家有关法律、法规,尊重网上道德,承担一切因您的行为而直接或间接引起的法律责任。

     天极网拥有管理笔名和留言的一切权利。
    相关内容