Hi,
I'm afraid we don't have sample code for what you need to do. However, you can try this approach:
- create a
search for "winword.exe" (this is more reliable than using a hard-coded path)
- the name of the search is actually an installer property which will contain the result of the search, so inside your custom action you can retrieve the "winword.exe" path
- after retrieving the version of "winword.exe" you can set a custom installer property
- this property can be used to condition the files
The code can look like this (I didn't test it, so you may need to adjust it):
Code: Select all
Dim winWordPath
winWordPath = Session.Property("WINWORD_PATH")
set fso = createobject("scripting.filesystemobject")
officeVersion = fso.getfileversion(winWordPath)
If officeVersion = 11 Then
Session.Property("OFFICE_VERSION") = "11"
End If
If officeVersion = 12 Then
Session.Property("OFFICE_VERSION") = "12"
End If
This code can be pasted into a .VBS file which can be added as a New Attached Custom Action. To run it at the beginning of the installation you can scheduled it under the "InstallExecuteSequence" -> "CostFinalize" standard action.
After this custom action runs the OFFICE_VERSION property should be set to "11", "12" or to an empty value. This property can now be used in the
Organization page to
condition the components of the files you want. The components which should be installed only for Office 2003 can use the condition:
he components which should be installed only for Office 2007 can use the condition:
Regards,
Cosmin
FOLLOW US
Get the latest news in Application Packaging