Jump to content


This is a ready-only archive of the InstallSite Forum. You cannot post any new content here. / Dies ist ein Archiv des InstallSite Forums. Hier können keine neuen Beiträge veröffentlicht werden.
Photo

How could I know the version number of Office


7 replies to this topic

P-Y Orban

P-Y Orban
  • Full Members
  • 10 posts

Posted 07 August 2007 - 13:12

Hi,

[Sorry for my english, I speak French]

I want to know what's the version number of Microsoft Office installed on the user's PC because I must copy Excel templates in the Office folder.

But Office folder can change according to the version. (The directory is :
C:\Program Files\Microsoft Office\Office[X]\... where X is the version number)

I tested with the function "VerFindFileVersion" (to search Excel.exe)
but this function search only in the windows directory (not in Program Files)

With VerGetFileVersion, I must enter the directory of the file ... but I don't know it.

What can I do to resolve my problem ?

Thank's for answers !

Stefan Krueger

Stefan Krueger

    InstallSite.org

  • Administrators
  • 13,269 posts

Posted 07 August 2007 - 14:15

Maybe Office stores the path somewhere in registry?
ypically this information is stored in the InstallLocation value under HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\{Office's product GUID}

Or you could try calling an MSI API function to retrieve the component location of the main executable.

P-Y Orban

P-Y Orban
  • Full Members
  • 10 posts

Posted 07 August 2007 - 15:21

Thanks' for your answer Mr. Krueger,

What's an MSI API function ?

If i'm on a InstallScript Project, can I use this function ?

Stefan Krueger

Stefan Krueger

    InstallSite.org

  • Administrators
  • 13,269 posts

Posted 08 August 2007 - 16:40

MSI is short for "Windows Installer" which is the instalaltion engine that is part of the operating system and is used by many setups, including Microsoft Office. There are function you can call (application programming interface, API) similar to Windows functions. You would have to prototype them in your script.

P-Y Orban

P-Y Orban
  • Full Members
  • 10 posts

Posted 09 August 2007 - 08:48

Thank's Stefan but if it's Windows Installer functions, I can't use it on my InstallScript projet ! No ?



Stefan Krueger

Stefan Krueger

    InstallSite.org

  • Administrators
  • 13,269 posts

Posted 09 August 2007 - 19:21

You can prototype and call Windows API functions in your script. See help about UseDLL.

P-Y Orban

P-Y Orban
  • Full Members
  • 10 posts

Posted 10 August 2007 - 07:55

Ok, I will see help wink.gif

If I have a problem, I will return rolleyes.gif

P-Y Orban

P-Y Orban
  • Full Members
  • 10 posts

Posted 10 August 2007 - 10:46

Finally, I used the functions FindFileAll, VerGetFileVersion, CopyBits, etc ...

Thank's for your answers Stefan !