色吊丝最新资源-第一福利在线视频-欧美久久久-欧产日产国产精品v原神 |www.phbaer.net

來古計算機(jī) > Windows系統(tǒng) > 正文

利用腳本修復(fù)丟失的WINDOWS引導(dǎo)文件

使用Windows系統(tǒng)的用戶有時會遇到系統(tǒng)引導(dǎo)文件丟失,造成系統(tǒng)無法正常啟動。Windows系統(tǒng)引導(dǎo)文件丟失,即系統(tǒng)目錄下Boot目錄及Bootmgr丟失,一般的解決方案有如下兩種:

1. 進(jìn)WINPE系統(tǒng)進(jìn)行修復(fù)。

2. 利用bootbcd修復(fù),bootbcd c:\Windows /s c:。

第二種方法可能會報錯:BFSVC: Failed to set element application device. Status = [c00000bb],此時可以用如下的腳本進(jìn)行修復(fù)。

如將該腳本保存為Windowstest.bat,需要修復(fù)的盤為z盤,運行命令Windowstest.bat 即可。


::@echo off ::make sure have one parameter if [%1] == [] exit 1 ::create environment bcdboot %1:\Windows /s %1: del %1:\Boot\BCD ::create BCD Filebcdedit.exe /createstore %1:\Boot\BCD ::create bootmgr bcdedit.exe /store %1:\Boot\BCD /create {bootmgr} /d "Winodws Boot Manager"bcdedit.exe /store %1:\Boot\BCD /set {bootmgr} device partition=C: ::get device keyfor /f "delims=" %%i in ('bcdedit.exe /store %1:\Boot\BCD /create /d "Windows7" /application osloader') do ( set DeviceKey=%%i )set DeviceKey=%DeviceKey:~2,38% echo %DeviceKey% ::set BCD bcdedit.exe /store %1:\Boot\BCD /set %DeviceKey% device partition=C: bcdedit.exe /store %1:\Boot\BCD /set %DeviceKey% osdevice partition=C: bcdedit.exe /store %1:\Boot\BCD /set %DeviceKey% path \Windows\system32\winload.exe bcdedit.exe /store %1:\Boot\BCD /set %DeviceKey% systemroot \Windows bcdedit.exe /store %1:\Boot\BCD /displayorder %DeviceKey% bcdedit.exe /store %1:\Boot\BCD /default %DeviceKey% ::avoid winload.exe error bcdedit.exe /store %1:\Boot\BCD /set {default} osdevice boot bcdedit.exe /store %1:\Boot\BCD /set {default} device boot bcdedit.exe /store %1:\Boot\BCD /set {default} detecthal 1


推薦文章

發(fā)表評論:

◎歡迎參與討論,請在這里發(fā)表您的看法、交流您的觀點。

標(biāo)簽列表
網(wǎng)站分類
最新留言

Powered By Z-BlogPHP and Terry

Copyright @ laigucomputer.com 來古計算機(jī) 工信部備案號:粵ICP備18009132號