It consists of 3 files and relies on the abilty of PE's disk management to be in working order and DISKPART.EXE to be present.
cleanhd.cmd :
CODE
@echo off
REM Name cleanhd.cmd
echo.
echo Do you want to WIPE ALL PARTITIONS on the 1st hard drive?
echo -- THIS WILL TOTALLY ERASE ALL DATA ON YOUR DISK! --
echo.
set _ok=
set /p _ok=To continue type "YES" (uppercase without quotes) :
if "%_ok%" == "YES" goto _wipeit
goto end
:_wipeit
%SystemDrive%
cd %SystemRoot%\system32
echo.
echo.
diskpart /s cleanhd1.scr
echo.
echo.
echo Current disk allocations:
echo.
diskpart /s cleanhd2.scr
echo.
echo.
pause
cd \
:end
exit
REM Name cleanhd.cmd
echo.
echo Do you want to WIPE ALL PARTITIONS on the 1st hard drive?
echo -- THIS WILL TOTALLY ERASE ALL DATA ON YOUR DISK! --
echo.
set _ok=
set /p _ok=To continue type "YES" (uppercase without quotes) :
if "%_ok%" == "YES" goto _wipeit
goto end
:_wipeit
%SystemDrive%
cd %SystemRoot%\system32
echo.
echo.
diskpart /s cleanhd1.scr
echo.
echo.
echo Current disk allocations:
echo.
diskpart /s cleanhd2.scr
echo.
echo.
pause
cd \
:end
exit
The first script for diskpart input named cleanhd1.scr :
CODE
select disk 0
clean
exit
clean
exit
The second script to show the user the results, name cleanhd2.scr
CODE
list disk
select disk 0
detail disk
select disk 0
detail disk
Place all three files in the %SystemRoot%\system32 folder. Make a shortcut to it or NU2 menu entry for it (sorry no included. I use the Explorer shell). Modify the scripts for other drive but remember that the first hard drive is #0, the second is #1 etc.