This website uses cookies. By clicking Accept, you consent to the use of cookies. Click Here to learn more about how we use cookies.
Turn on suggestions
Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.
- Revenera Community
- :
- InstallShield
- :
- InstallShield Forum
- :
- HOw to detect if Active Directory is installed on target machine?
Subscribe
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Subscribe
- Mute
- Printer Friendly Page
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Jan 14, 2011
12:27 AM
HOw to detect if Active Directory is installed on target machine?
A would appreciate any help - snippet, InstallShield IDE steps or any article.
Thanks
Thanks
(2) Replies
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Jan 14, 2011
06:20 AM
you need to do a system search for a file or registry key that get installed by active directory and store this in a Public property say MYSEARCHPROP. You can use this in a condition like this: if MYSEARCHPROP then ...
This works because MYSEARCHPROP is empty if the search returns no results.
This works because MYSEARCHPROP is empty if the search returns no results.
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Jan 14, 2011
01:52 PM
WalterT wrote:
you need to do a system search for a file or registry key that get installed by active directory and store this in a Public property say MYSEARCHPROP. You can use this in a condition like this: if MYSEARCHPROP then ...
This works because MYSEARCHPROP is empty if the search returns no results.
Hi Walter,
Thanks a lot for your help. I've just done this
function BOOL CheckMAPI()
STRING szKey, szField, szValue, svResult, msg;
NUMBER nValue, nSize, nType;
BOOL nRet;
begin
nRet = FALSE;
szKey = "\\SOFTWARE\\Microsoft\\Windows Messaging Subsystem";
szField = "MAPI";
nType = REGDB_NUMBER;
REGDB_OPTIONS = REGDB_OPTIONS | REGDB_OPTION_WOW64_64KEY;
RegDBSetDefaultRoot(HKEY_LOCAL_MACHINE);
//Check to see if the key exists.
if (RegDBKeyExist (szKey) = 1) then
// Retrieve key value information.
if (RegDBGetKeyValueEx(szKey, szField, nType, szValue, nSize) = 0) then
StrToNum(nValue,szValue);
Sprintf(msg,"Method Suceess: RegDBGetKeyValueEx(szKey=%s,szField=%s,nType=%d,szValue=%s,nSize=%d)",szKey,szField,nType,szValue,nSize);
WriteLogMsg(msg);
if(nValue = 1) then
// look for MAPI32.DLL
if(FindFile (WINSYSDIR, "mapi32.dll", svResult) = 0) then
WriteLogMsg("Detected " + "MAPI32.DLL at WINSYSDIR=" + WINSYSDIR);
nRet = TRUE;
else
WriteLogMsg("NOT Detected " + "MAPI32.DLL at WINSYSDIR=" + WINSYSDIR);
endif;
endif;
else
Sprintf(msg,"Method Failed: RegDBGetKeyValueEx(szKey=%s,szField=%s,nType=%d,szValue=%s,nSize=%d)",szKey,szField,nType,szValue,nSize);
WriteLogMsg(msg);
SprintfBox( SEVERE, "MAPI not detected", "Unable to retreive MAPI information." );
endif;
endif;
if(!nRet) then
msg = "MAPI not installed.\nCisco Mail Free/Busy Synchronization service requires MAPI installed and running.";
WriteLogMsg(msg);
SprintfBox( SEVERE, "MAPI not installed", msg);
endif;
return nRet;
end;
Is there any MAPI prerequisite or AD prerequisites I could include into the project? Similar to .NET Framework prerequisite etc.?
Thanks,