Windows XP Windows 7 Windows 2003 Windows Vista Windows 綜合教學 Linux 系統教學
Windows 10 Windows 8 Windows 2008 Windows NT Windows Server 電腦軟體教學

深入認識與撰寫專殺工具:開機即掃毒(二)Windows Vista/7 篇

編輯:Win7 系統基礎知識

Vista/7 使用 NTFS,DOS 無法讀寫,改用 Windows PE 2.0 實現開機自動掃毒。

步驟概要

  1. 撰寫專殺批次檔 d:\kill.bat(支援更多參數):
attrib -h -r -s C:\Windows\IGM.exe
del /f /q /s C:\Windows\IGM.exe
md C:\Windows\IGM.exe
shutdown -r
  1. 取得 PE 映像:下載 PE ISO,用 WinRAR 解壓至 d:\PE。
  2. 掛載 boot.wim:以管理員執行 WimTool,掛載 d:\PE\sources\boot.wim 至 d:\PE1(需 NTFS)。
  3. 修改 peshell.ini:編輯 d:\PE1\Windows\system32\peshell.ini,在 [AutoRun] 區段末加入 1=d:\kill.bat。
  4. 卸載並儲存映像:WimTool 點「卸載映像」選「是」保存變更。
  5. 加入開機選單:用 EasyBCD 新增 WinPE 項目,指向 d:\PE\sources\boot.wim,插入 Vista/7 光碟複製必要檔案。
  6. 重開機選擇「NST WinPE Image」即進入 PE 自動掃毒,完成後自動重開機。

補充:XP 系統若為 NTFS 分區,同樣可安裝 PE 到 NTFS 分區掃毒,修改 boot.ini 加入啟動項即可。

Copyright © Windows教程網 All Rights Reserved