STRING svInstalledPath, szKeyRoot;
NUMBER nvSize, nType;
begin
RegDBSetDefaultRoot ( HKEY_LOCAL_MACHINE );
szKeyRoot = "SOFTWARE\\Microsoft\\Office\\11.0\\Outlook\\InstallRoot";
nType = REGDB_STRING;
if (RegDBKeyExist (szKeyRoot) < 0) then
MessageBox ("RegDBKeyExist failed.", SEVERE);
else
if ( RegDBGetKeyValueEx (szKeyRoot, "Path", nType, svInstalledPath, nvSize) < 0 ) then
MessageBox ("RegDBGetKeyValueEx failed.", SEVERE);
else
LaunchAppAndWait(svInstalledPath + "Outlook.exe", "", NOWAIT);
endif;
endif;
end;