I am using below installscript code to identify whether SharePoint is installed or not. but its not working. The function returns -1. Not sure what is the issue. can someone please help? I want to do below steps
Reach to this registry location first ""SOFTWARE\Microsoft\Shared Tools\Web Server Extensions\15.0""
Read Name "SharePoint" and its value "Installed"
refer attached image.
function IsSharePointInstalled()
STRING szKey, svValue, szName;
NUMBER nvType, nvSize;
begin
RegDBSetDefaultRoot(HKEY_LOCAL_MACHINE);
szKey = "SOFTWARE\\Microsoft\\Shared Tools\\Web Server
Extensions\\15.0";
szName = "SharePoint";
if(RegDBKeyExist (szKey) >=1) then
MessageBox("Key found", INFORMATION);
if(RegDBGetKeyValueEx(szKey, szName, nvType, svValue, nvSize) < 0) then
MessageBox("Failed to get value", INFORMATION);
else
MessageBox("Successfully got value", INFORMATION);
endif;
endif;
RegDBSetDefaultRoot(HKEY_CLASSES_ROOT);
end;