Under Vista Home Basic the program run with admin right. And can defrag all files.
Change the batch not possible, the problem is the runas and jkdefrag with parameter not work.
Here is a batch work with all windows version. Ignore the german
@echo off
Echo Letze komplette Defragmentierung.
if exist last_defrag.log type last_defrag.log
if not exist last_defrag.log Echo Keine.
Echo.
Echo Aktuelles Datum: %date%
Echo Analysiere
JkDefrag.exe -a 1
notepad JkDefrag.log
:fragen
set /P X= (T)aeglich oder (V)olle defragmentierung oder (B)eenden?
if /I "%X%"=="T" goto :daily
if /I "%X%"=="V" goto :nein
if /I "%X%"=="B" goto :ende
goto fragen
:daily
Echo Taeglich
JkDefrag.exe
goto ende
:nein
Echo Volle defragmentierung.
Echo Das dauert etwas.
echo %date% >last_defrag.log
JkDefrag.exe -a 4
:ende
del JkDefrag.log
Under Vista work only when jkdefrag have admin right.
As task, possible, but i hate the task scheduler.
The batch is runing manuelly.