System Delphi

Title: How to determinate in whitch way windows is started
Label1.Caption := IntToStr(GetSysTemMetrics(SM_CLEANBOOT));
{
Will return:
0 Normal boot
1 Fail-safe boot
2 Fail-safe with network boot
}