請教批處理調用wef為何無法使用在xp3上請教wef無法使用在xp3上的問題結果開啟后系統就錯誤,要修復后才能開機這是什么問題呢CMD調用EWF則出現函數錯誤!難道是EWF版本問題?EWF是2.0.927.0,請各位幫忙看看nclick="copycode($('code0'));">復制代碼
- @echo off
- :EWFX
- title空白
- mode con COLS=80 lines=40
- color 0a
- cls
- echo.
- echo. 首次使用正在安裝!
- echo.
- if not exist %SystemRoot%system32ewfmgr.exe goto :EWFA
- for /f tokens=2 %%i in ('ewfmgr.exe c:^|find State') do set tai=%%i
- if %tai% == DISABLED set zhuang=未保護狀態
- if %tai% == ENABLED set zhuang=已保護狀態
- for /f tokens=5 %%i in ('ewfmgr.exe c:^|find data') do set rong=%%i
- set /a rong=%rong%/1024
- set /a rong=%rong%/1024
- set /a sheng=512-%rong%
- if %rong% lss 10 set rong=00%rong%
- if %rong% lss 10 goto EWF
- if %rong% lss 100 set rong=0%rong%
- :EWF
- mode con COLS=80 lines=40
- color 0a
- cls
- echo.
- echo ╭───────────────╮
- echo ╭──┤系統保護工具├──╮
- echo │╰───────────────╯│
- echo ││
- echo │ 注意在本工具(EWF)保護狀態下,對系│
- echo ││
- echo │ 統盤(即C盤)寫入數據,不能超過512M數據│
- echo ││
- echo │ 否則就要重啟計算機了,推薦上網頁或其他 │
- echo ││
- echo │ 一些簡單操作時候可以開啟本工具! │
- echo ││
- echo ││
- echo │ 注意現計算機處于:【%zhuang%】 │
- echo │ 注意現已用內存為:【%rong%M】 │
- echo │ 注意現可用內存為:【%sheng%M】 │
- echo.
- echo============================================
- echo A -
- echo B - 數據保存(將本次開機所做的操作保存,僅C盤)
- echo C - 打開C盤保護
- echo D - 打開所有盤保護
- echo E - 關閉所有保護
- echo H - 查看當前保護狀態
- echo============================================
- echo U - 卸載系統保護軟件
- echo.
- echo 0 - 返回主菜單
- echo============================================
- echo.
- echo.
- echo.
- echo.
- echo.
- set ver0=
- set /p ver0=請輸入[序號+回車]:
- if /i %ver0%==A goto :EWF
- if /i %ver0%==B goto :EWFB
- if /i %ver0%==C goto :EWFC
- if /i %ver0%==D goto :EWFD
- if /i %ver0%==E goto :EWFE
- if /i %ver0%==h goto :EWFH
- if /i %ver0%==U goto :EWFU
- if /i %ver0%==0 goto :eof
- echo.
- echo.
- echo.
- pause
- goto :EWF
- :EWFA
- mode con COLS=80 lines=40
- color 0a
- cls
- echo首次使用正在安裝!
- echo.
- echo安裝后會重啟電腦,
- echo.
- echo 重啟后將會是開啟保護C盤狀態,任意鍵開始!
- pause
- call EWFewf.reg
- copy EWFewfdll.dll %SystemRoot%system32
- copy EWFewfinit.dll %SystemRoot%system32
- copy EWFewfmgr.exe %SystemRoot%system32
- copy EWFewf.sys %SystemRoot%system32drivers
- copy EWFewf.inf %SystemRoot%inf
- rundll32.exe setupapi.dll,InstallHinfSection DefaultInstall %SystemRoot%infewf.inf
- echo安裝完成,3秒后重啟電腦
- shutdown.exe -r -t 3
- goto :EWF
- :EWFB
- mode con COLS=80 lines=40
- color 0a
- cls
- echo保存后會重啟電腦,任意鍵將開始
- pause
- EWFMGR.exe C: -COMMITANDDISABLE
- shutdown.exe -r -t 3
- goto :EWF
- :EWFC
- mode con COLS=80 lines=40
- color 0a
- cls
- echo打開C盤保護需要重啟電腦,任意鍵將開始
- pause
- ewfmgr.exe c: -enable
- shutdown.exe -r -t 5
- goto :EWF
- :EWFD
- mode con COLS=80 lines=40
- color 0a
- cls
- echo保護所有盤會重啟電腦,任意鍵將開始,盤符最多為Z
- echo 從C到Z
- pause
- ewfmgr.exe C: -enable
- ewfmgr.exe D: -enable
- ewfmgr.exe E: -enable
- ewfmgr.exe F: -enable
- ewfmgr.exe G: -enable
- ewfmgr.exe H: -enable
- ewfmgr.exe i: -enable
- ewfmgr.exe J: -enable
- ewfmgr.exe K: -enable
- ewfmgr.exe L: -enable
- ewfmgr.exe M: -enable
- ewfmgr.exe N: -enable
- ewfmgr.exe O: -enable
- ewfmgr.exe P: -enable
- ewfmgr.exe Q: -enable
- ewfmgr.exe R: -enable
- ewfmgr.exe S: -enable
- ewfmgr.exe T: -enable
- ewfmgr.exe U: -enable
- ewfmgr.exe V: -enable
- ewfmgr.exe W: -enable
- ewfmgr.exe X: -enable
- ewfmgr.exe Y: -enable
- ewfmgr.exe Z: -enable
- shutdown.exe -r -t 5
- goto :EWF
- :EWFE
- mode con COLS=80 lines=40
- color 0a
- cls
- echo保護所有盤會重啟電腦,任意鍵將開始,盤符最多為Z
- echo 從C到Z
- pause
- ewfmgr.exe C: -COMMITANDDISABLE
- ewfmgr.exe D: -COMMITANDDISABLE
- ewfmgr.exe E: -COMMITANDDISABLE
- ewfmgr.exe F: -COMMITANDDISABLE
- ewfmgr.exe G: -COMMITANDDISABLE
- ewfmgr.exe H: -COMMITANDDISABLE
- ewfmgr.exe i: -COMMITANDDISABLE
- ewfmgr.exe J: -COMMITANDDISABLE
- ewfmgr.exe K: -COMMITANDDISABLE
- ewfmgr.exe L: -COMMITANDDISABLE
- ewfmgr.exe M: -COMMITANDDISABLE
- ewfmgr.exe N: -COMMITANDDISABLE
- ewfmgr.exe O: -COMMITANDDISABLE
- ewfmgr.exe P: -COMMITANDDISABLE
- ewfmgr.exe Q: -COMMITANDDISABLE
- ewfmgr.exe R: -COMMITANDDISABLE
- ewfmgr.exe S: -COMMITANDDISABLE
- ewfmgr.exe T: -COMMITANDDISABLE
- ewfmgr.exe U: -COMMITANDDISABLE
- ewfmgr.exe V: -COMMITANDDISABLE
- ewfmgr.exe W: -COMMITANDDISABLE
- ewfmgr.exe X: -COMMITANDDISABLE
- ewfmgr.exe Y: -COMMITANDDISABLE
- ewfmgr.exe Z: -COMMITANDDISABLE
- shutdown.exe -r -t 5
- goto :EWF
- :EWFH
- mode con COLS=80 lines=40
- color 0a
- cls
- ewfmgr.exe C: -all
- echo 任意鍵返回
- pause
- goto :EWF
- :EWFU
- mode con COLS=80 lines=40
- color 0a
- cls
- del %SystemRoot%system32ewfdll.dll
- del %SystemRoot%system32ewfinit.dll
- del %SystemRoot%system32ewfmgr.exe
- del %SystemRoot%system32driversewf.sys
- del %SystemRoot%infewf.inf
- Echo 操作完成,5秒后返回菜單
- ping /n 5 127.0.0.1>nul
- goto :eof