• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 784
  • Last Modified:

Ms outlook detection

Hi Experts,

Could anyone tell me how to detect the Microsoft office outlook installed (any version) on my machine ?


Thanks in advance.
0
tariq6000
Asked:
tariq6000
  • 4
  • 3
  • 2
  • +2
4 Solutions
 
OlskiCommented:
The program, by default is installed to: C:\Program Files\Microsoft Office check if this folder exists. Or Click Start then Run and type in winword.exe and see if word opens.
0
 
geneusCommented:
Create a TEXT File and Paste the following into it:

'Start Here
Set objOutlook = WScript.CreateObject("Outlook.Application")
WScript.Echo objOutlook.Version
'End Here

Save the TEXT File as OutlookVersion.vbs

Double-Click to run and the version will be displayed.
0
 
OlskiCommented:
Sorry I missed the Outlook bit and only read the MS office. Start>Run type Outlook.exe and click ok.
0
Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
jkrCommented:
If you want to do that programmatically, check for the existance of the registry key

HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Office\Outlook

I.e.

bool IsOutlookInstalled () {

    HKEY hKey = NULL;
    REGSAM sam = KEY_READ;
    const char* pszKeyBase = "SOFTWARE\\Microsoft\\Office\\Outlook";

    if ( ERROR_SUCCESS != RegOpenKeyEx ( HKEY_LOCAL_MACHINE, acKey, 0, sam, &hKey)) {

       return false; // nothing to do...
    }

    RegCloseKey ( hKey);

    return true;
}

0
 
tariq6000Author Commented:
Hi jkr:
Thanks for this but If I install Ms-outlook then it creates entry in regstery   HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Office\Outlook but if I uninstall it then this entry also present in registry.

Is there any workaround?
0
 
johnb6767Commented:
Simple batch file.....
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
echo off
cls
if exist "C:\Program Files\Microsoft Office\Office9\outlook.exe" echo Outlook 2000 is installed
if exist "C:\Program Files\Microsoft Office\Office10\outlook.exe" echo Outlook XP is installed
if exist "C:\Program Files\Microsoft Office\Office11\outlook.exe" echo Outlook 2003 is installed
if exist "C:\Program Files\Microsoft Office\Office12\outlook.exe" echo Outlook 2007 is installed
echo.
pause
exit
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
0
 
jkrCommented:
>>but if I uninstall it then this entry also present in registry.

Does the same apply to

HKEY_CURRENT_USER\Software\Microsoft\Office\Outlook

?

Checking for paths o disk IMO isn't really gonna be successful, since the drive does not need to be 'c:' and the paths will differ in the localized Windows versions...
0
 
johnb6767Commented:
Correct, but if they used a single source of installation ie custom .msi, then it should be the same.
0
 
jkrCommented:
Right, but users are free to choose any arbitrary directory. The localization issue could be addressed using "%ProgramFiles%", yet there is no guarantee that all users will install it there.
0
 
johnb6767Commented:
Correct again. I was hoping that if they were using a standard Unattended install, they dont get that choice......

Unfortunately, I am not a VB Scripter, so I am trying to ffer a simple solution, that might fit thier needs.
0
 
tariq6000Author Commented:
Is there any registry entry to check ?
0
 
johnb6767Commented:
The problem with the reg values, are that even if the key is present, it might not be reliable. If the app has been uninstalled, the reg value might not get deleted.....
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

  • 4
  • 3
  • 2
  • +2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now