Welcome Serena Central users! CLICK HERE
The migration of the Serena Central community is currently underway. Be sure to read THIS MESSAGE to get your new login set up to access your account.
JaapV Super Contributor.
Super Contributor.

detect outlook 32bit or 64bit

How can i detect within a cobol program on a Windows PC if there is running a 32bit outlook/excel/word or a 64bit version is running?

If it is possible a solution in cobol.

Thanks in advance.

Tags (1)
3 Replies
tcakirgil Absent Member.
Absent Member.

RE: detect outlook 32bit or 64bit

basicaly look at the word.exe, outlook.exe files
if they excist in the directory Program Files (x86) then they are 32bit. If they are in directory Program files then they are 64bit

Checks whether a file exists and returns details if it does.
call "CBL_CHECK_FILE_EXIST" using filename
returning status-code
filename                       pic x(n).
file-details                   A group item predefined as cblt-exit-params,
                               containing the following subordinate items:
    cblte-fe-filesize          cblt-x8-compx.
    cblte-fe-date            Group item defined as:
        cblte-fe-day           cblt-x1-compx.
        cblte-fe-month         cblt-x1-compx.
        cblte-fe-year          cblt-x2-compx.
    cblte-fe-time            Group item defined as:
        cblte-fe-hours         cblt-x1-compx.
        cblte-fe-minutes       cblt-x1-compx.
        cblte-fe-seconds       cblt-x1-compx.
        cblte-fe-hundredths    cblt-x1-compx.
status-code                    See Key
On Entry:
The file to look for. The name can contain a path, and is terminated by a space. If no path is given, the current directory is assumed.
On Exit:
The size of the file in bytes.
The date the file was created.
The time the file was created.
You cannot use wildcard characters in filenames.
CBL_CHECK_FILE_EXIST is not stripe-aware. If you use this routine on a file for which striping is enabled, the details returned refer to the first stripe only. Therefore, use this routine on an individual stripe only and refer to the stripe by the stripe name. For more information on the use of striped files, please refer to the section File Striping in the chapter File Handler Configuration.
You can check the success of the call by examining RETURN-CODE. See Interpreting the Return Code as a File Status Code for more details.
JaapV Super Contributor.
Super Contributor.

RE: detect outlook 32bit or 64bit

Oke that can be a solution, but is there not a way to check in the systemregistry?
JaapV Super Contributor.
Super Contributor.

RE: detect outlook 32bit or 64bit

I found, opened and read the registrykey:

           STRING    "Software\Microsoft\Windows\CurrentVersion\"
                     "App Paths\OUTLOOK.EXE"
                                               INTO  SUBKEY-NAME-SREG

I get a error when i do the same with:

           STRING    "Software\Microsoft\Office\ClickToRun\"
                                               INTO  SUBKEY-NAME-SREG


The open registry is done with HKEY_LOCAL_MACHINE.

Windows 10 with Extend 10.0.1 with path 1619.

The opinions expressed above are the personal opinions of the authors, not of Micro Focus. By using this site, you accept the Terms of Use and Rules of Participation. Certain versions of content ("Material") accessible here may contain branding from Hewlett-Packard Company (now HP Inc.) and Hewlett Packard Enterprise Company. As of September 1, 2017, the Material is now offered by Micro Focus, a separately owned and operated company. Any reference to the HP and Hewlett Packard Enterprise/HPE marks is historical in nature, and the HP and Hewlett Packard Enterprise/HPE marks are the property of their respective owners.