I need to check if schedule is running from a script, so I need something like a registry entry. The above script changes the startup value to automatic, but I carn't find the registry value to change the current hardware profile to ENABLE.

$value = ReadValue ("HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Schedule", "Start")
if $value = "2"
$txt = "Schedule running" gosub TEXT
run "cmd /c at /delete /yes"
run "cmd /c at 20:00 %windir%\shtdwn.exe /2"
else
$txt = "Setting schedule to run " gosub TEXT
writevalue("HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Schedule","Start","2","REG_DWORD")
gosub err
endif

Any ideas??
Thanks
John Carr