Hello,
I am having a problem with chkdsk. It seems to be configured properly and the cmd file runs, but nothing is scanned.
I enter in the options and instantly I get the message
chkdsk.cmd: Check disk done...
Press any key to continue......
It appears that chkdsk.exe is not able run for some reason. Starting it from the command line doesn't work either.
Any suggestions would be appreciated. I have had great luck with other plugins and configuring them, but for some reason this one should be the easiest and its turning out to be the most difficult.
Thank you for your help
Robert
The files below are
Chkdsk.inf
chkdsk.cmd - original from bart
chkdsk2nd.cmd - a modified copy found on the web - same results
*********************
; chkdsk.inf
; PE Builder v3 plug-in INF file for chkdsk.exe
; Created by Bart Lagerweij
[Version]
Signature= "$Windows NT$"
[PEBuilder]
Name="Check Disk (chkdsk.exe)"
Enable=1
Help="chkdsk.htm"
[SourceDisksFiles]
chkdsk.exe=2
chkdsk.cmd=2,,1
chkdsk2nd.cmd=2,,1
[Append]
nu2menu.xml, chkdsk_nu2menu.xml
**********************************
**********************************
; chkdsk.cmd
@echo off
rem chkdsk.cmd
rem Created by Bart Lagerweij
setlocal
echo CHKDSK.CMD: Starting...
echo.
set _drive=
set _r=
set _f=
echo Please enter the drive, mount point or volume name to check (for example "c:")...
set /p _drive=Enter drive:
if "%_drive%" == "" goto _end
echo.
echo Do you want to fix errors on the disk *and*
echo locate bad sectors and recover readable information (Yes/No)...
:_recinp
set /p _r=Enter "y" or "n":
if "%_r%" == "" goto _recinp
if /I "%_r%" == "y" goto _go
if /I "%_r%" == "n" goto _fix
goto _recinp
:_fix
echo.
echo Do you want to fix errors on the disk (Yes/No)...
:_fixinp
set /p _f=Enter "y" or "n":
if /I "%_f%" == "" goto _fixinp
if /I "%_f%" == "y" goto _go
if /I "%_f%" == "n" goto _go
goto _recinp
:_go
echo.
echo ----------------------------------------------------------------
echo You have specified to check drive/volume %_drive%
echo.
echo With the following options:
if /I "%_r%" == "y" goto _pfix
if /I "%_f%" == "y" goto _pfix
goto _nofix
:_pfix
echo - Fix errors on the disk
:_nofix
if /I "%_r%" == "y" echo - Locate bad sectors and recover readable information (slow!)
echo ----------------------------------------------------------------
echo.
echo Start check disk? (Yes/No)...
:_startinp
set /p _s=Enter "y" or "n":
if /I "%_s%" == "" goto _startinp
if /I "%_s%" == "y" goto _run
if /I "%_s%" == "n" goto _abort
goto _startinp
:_run
if /I "%_f%" == "y" set _param=/f
if /I "%_r%" == "y" set _param=/r
set _param=%_drive% %_param%
echo Running: chkdsk.exe %_param%
chkdsk.exe %_param%
echo.
echo CHKDSK.CMD: Check disk done...
goto _end
:_abort
echo.
echo CHKDSK.CMD: Aborted...
:_end
pause
endlocal
**********************************
**********************************
@echo off
:: chkdsk.cmd
:: Created by Bart Lagerweij
:: Modified by Benny Pedersen, http://home1.stofanet.dk/photo
:: Replace the existing file "chkdsk.cmd" in this folder: ...plugin/chkdsk
setlocal
echo CHKDSK.CMD: Starting...
set _drv=
set _r=
set _f=
set _param=
echo.
set /p _drv=Check Disk. Enter drive letter:
if "%_drv%" == "" goto _end
for %%0 in (A B C D E F G H I J K L M N O P Q R S T U V W X Y Z) do if /I "%_drv%" == "%%0" set _drv=%%0:
:_recInp
echo.
echo Do you want to fix errors on the disk *and*
echo locate bad sectors and recover readable information (Yes/No)...
:_recInp_loop
set /p _r=Enter1 "y" or "n":
if /I "%_r%" == "y" goto _go
if /I "%_r%" == "n" goto _fixInp
goto _recInp_loop
:_fixInp
echo.
echo Do you want to fix errors on the disk (Yes/No)...
:_fixInp_loop
set /p _f=Enter2 "y" or "n":
for %%0 in (y n) do if /I "%_f%" == "%%0" goto _go
goto _fixInp_loop
:_go
echo.
echo -------------------------------------------------------
echo You have specified to check drive/volume (%_drv%)
if /I not "%_f%" == "n" echo With the following options:
echo.
for %%0 in (%_f% %_r%) do if /I "%%0" == "y" echo. Fix errors on the disk.
if /I "%_r%" == "y" echo. Locate bad sectors and recover readable information.
echo -------------------------------------------------------
if /I "%_f%" == "y" set _param=/f
if /I "%_r%" == "y" set _param=/r
echo.
echo Ready to run: chkdsk.exe %_drv% %_param%
echo Press Ctrl+Break to cancel, or any key to continue...
pause > nul
chkdsk.exe %_drv% %_param%
echo.
echo CHKDSK.CMD: done...
pause
:_end
endlocal
**********************************
