Jump to content

Search the Community

Showing results for tags 'office version'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • General
    • Announcements and Site News
    • Administration
  • AutoIt v3
    • AutoIt Help and Support
    • AutoIt Technical Discussion
    • AutoIt Example Scripts
  • Scripting and Development
    • Developer General Discussion
    • Language Specific Discussion
  • IT Administration
    • Operating System Deployment
    • Windows Client
    • Windows Server
    • Office

Categories

  • AutoIt Team
    • Beta
    • MVP
  • AutoIt
    • Automation
    • Databases and web connections
    • Data compression
    • Encryption and hash
    • Games
    • GUI Additions
    • Hardware
    • Information gathering
    • Internet protocol suite
    • Maths
    • Media
    • PDF
    • Security
    • Social Media and other Website API
    • Windows
  • Scripting and Development
  • IT Administration
    • Operating System Deployment
    • Windows Client
    • Windows Server
    • Office

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


Member Title


Location


WWW


Interests

Found 1 result

  1. I need to get name/version of installed Microsoft Office in form similar to that one in About window: Microsoft Office Professional Plus 2010 (14.0.4763.1000) I searched internet/this forum for some simple examples but not much luck because all found examples use registry uninstall keys which are not exact. Here are related examples: http://support.microsoft.com/kb/2186281 Here is my derived improved example, syntax is in PowerBuilder - similar to VB/AU3 function uf_get_office_ver() string ls_key, ls_return, ls_pom, ls_name, ls_ver1, ls_ver2, ls_ver3, ls_subkeylist[], ls_valuearray[] long i,j ulong ul_pom integer li_rtn // 1) first quick check if Office installed and get approximate version ls_key = "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Office" li_rtn = RegistryKeys(ls_key, ls_subkeylist) if li_rtn = -1 then return '' ls_key += "\" j = UpperBound(ls_subkeylist) for i=1 to j li_rtn = RegistryValues(ls_key + ls_subkeylist[i] + "\Registration", ls_valuearray) if li_rtn = 1 then ls_ver1 = ls_subkeylist[i] // 14.0 ls_return = 'Microsoft Office ' + ls_subkeylist[i] exit end if next if ls_return = '' then return '' // isn't Office // 2) check exact name/version from Uninstall ls_key = "HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Uninstall" li_rtn = RegistryKeys(ls_key, ls_subkeylist) if li_rtn = -1 then return '' ls_key += "\" j = UpperBound(ls_subkeylist) for i=1 to j li_rtn = RegistryGet(ls_key + ls_subkeylist[i], "DisplayName", RegString!, ls_name) if li_rtn = -1 then continue // skip other applications than Office and also Office components if not(Pos(ls_name, 'Microsoft Office') > 0 and Pos(ls_name, 'Web Components') = 0) then continue li_rtn = RegistryGet(ls_key + ls_subkeylist[i], "ParentKeyName", RegString!, ls_pom) if li_rtn = 1 then continue // skip those with Parent li_rtn = RegistryGet(ls_key + ls_subkeylist[i], "SystemComponent", ReguLong!, ul_pom) if li_rtn = 1 and ul_pom = 1 then continue // skip SystemComponents=1 --> MUI (Czech), ... li_rtn = RegistryGet(ls_key + ls_subkeylist[i], "DisplayVersion", RegString!, ls_ver2) if li_rtn = -1 then continue // skip those without version // note: base version number must be the same with the one from first step // Microsoft Office Professional Plus 2010 (14.0.4763.1000) if Left(ls_ver2, Len(ls_ver1)) = ls_ver1 then // 3) beware: in registry there isn't version included service packs, therefore check exact version from EXE? (14.0.6106.5005) - SP1 // InstallLocation - C:\Program Files (x86)\Microsoft Office\ // ls_ver3 = ... return ls_name + ' (' + ls_ver2 + ')' end if next // if not found exact version from Uninstall, then return at least approximate version from first step return ls_return Problems: - I can get Microsoft Office Professional Plus 2010 (14.0.4763.1000) as result by this but in About window of my Word is (14.0.6106.5005) - because I have got SP1 and its version isn't in registry - I wanted to get get file version of MSO.DLL "C:\Program Files (x86)\Common Files\microsoft shared\OFFICE14\MSO.DLL" but there is problem how to get correct full path from registry - maybe there could be another way using COM but I don't know exact syntax for some general office COM object and its properties with product name/version http://msdn.microsoft.com/en-us/library/aa217200%28v=office.10%29.aspx Please give me some advise how to get exact version of installed Microsoft Office (included service packs) in some elegant/simple way.
×
×
  • Create New...