[batch] 解決忘記密碼無法登入 windows 問題

解決忘記密碼無法登入windows問題

  • 測試成功環境: Windows 2003, Windows XP
@echo off
echo.
echo 正在刪除系統目前使用的 SAM 檔案及相關註冊表檔案
echo.
del c:\windows\system32\config\sam /f /q >nul
del c:\windows\system32\config\system /f /q >nul
del c:\windows\system32\config\software /f /q >nul
del c:\windows\system32\config\security /f /q >nul
del c:\windows\system32\config\default /f /q >nul
echo 正在複製系統的備份 SAM 檔案及相關註冊表檔案
echo.
copy c:\windows\repair\sam c:\windows\system32\config\ >nul
copy c:\windows\repair\system c:\windows\system32\config\ >nul
copy c:\windows\repair\software c:\windows\system32\config\ >nul
copy c:\windows\repair\security c:\windows\system32\config\ >nul
copy c:\windows\repair\default c:\windows\system32\config\ >nul
echo 成功清除 Windows 所有帳戶及密碼資訊, 現在重新啟動程式即可直接進入 Windows 系統

此種方法提供一種最暴力登入 Windows 的辦法,需要透過F8進入安全模式下或是利用修復主控台的方式執行以上批次檔(batch),但如果該帳號有相關Windows加密資料此種方法會造成加密資料永遠就不回來。

最好還是透過 Offline NT Password & Recovery Editor 方式將該使用者密碼換掉或清空以便進入該帳號作後續處理,本文只是提供另一種思路。

106 comments

  1. Hello! I just wanted to ask if you ever have any issues with hackers?
    My last blog (wordpress) was hacked and I ended up losing several weeks of hard work
    due to no back up. Do you have any solutions to stop hackers?

  2. Hey excellent blog! Does running a blog similar to this take a large amount of work?
    I have no understanding of programming however I was hoping to start my own blog in the near
    future. Anyways, should you have any suggestions or
    techniques for new blog owners please share. I know this is
    off topic nevertheless I just needed to ask.
    Many thanks!

  3. Wow that was unusual. I just wrote an very long comment but after I clicked submit
    my comment didn’t show up. Grrrr… well I’m not writing all that
    over again. Anyway, just wanted to say excellent blog!

  4. Excellent post. I was checking constantly this blog
    and I am impressed! Very useful information specially the last
    part 🙂 I care for such info much. I was looking for this particular information for a very long time.
    Thank you and good luck.

發表迴響

你的電子郵件位址並不會被公開。 必要欄位標記為 *

*