.NET部署Office 2003可再分发主要互操作程序集(o2003pia.msi) [英] .NET Deploying Office 2003 Redistributable Primary Interop Assemblies (o2003pia.msi)

查看:256
本文介绍了.NET部署Office 2003可再分发主要互操作程序集(o2003pia.msi)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有没有人成功地为o2003.msi创建了一个预先申请?

Has anyone out there actually succeeded in creating a prerequisitie for o2003.msi?

有一个人在那里询问这个,但我找不到任何真正成功的人。我发现一些非常复杂的解决方案,您需要补充.cpp文件,可能会或可能不提供该文件。我甚至试图找到其中一个,但在目标机器上出现配置错误...: - (

There are a lot of people out there asking about this, but I cannot find anyone who actually succeeded. I find some extremely complicated solutions where you are required to comple .cpp-files for which the soure may or may not be supplied. I even tried to complie one of those but got configuration error on the target machine... :-(

如果我没有安装o2003.msi,我的Office共享加载项将抛出异常,因为找不到office.dll,所以我非常希望将其包含在我的安装程序中。

If I don't install o2003.msi, my Office "Shared Add-In" will throw an exception because office.dll cannot be found. So I would very much like to have it included in my installer.

另一个问题,不管以前的结果如何:Office 2007的机器怎么样?02203.msi抱怨Office 2003未安装,所以似乎有很多事情需要完成才能创建一个工作的安装程序一个办公室共享加载项...任何人经历同样的噩梦?

And a second question, regardless of the outcome of the previous one: what about a machine with Office 2007? 02203.msi complains that Office 2003 is not installed, so there seems to be a lot of things I need to get done in order to create a working installer for an "Office Shared Add-In"... anyone else going through the same nightmare?

更新:似乎是Office.Core /办公室的PIA .dll这是真正的东西在traget机器上没有一个复杂的解决方案(我知道我可以上班,如果我付出了一些努力)谈论如何检测这个特定的文件,只是PIA为Word和Excel,然后一些,这些似乎是在任何地方唉。这是office.dll,它是检查并安装o2003pia.msi的重要文件,如果它没有正确安装!

Update: It seems to be the PIA for Office.Core / "office.dll" which is the really thing to get on the traget machine. None of the "complicated" solutions (which I know I can get to work if I put some effort in it) talks how to detect this particular file, just PIAs for Word & Excel and then some. These seems to be in place anyway. It's office.dll that is the important file to check for and install o2003pia.msi if it is not properly installed!

推荐答案

可能太迟了,但这里是使用一小堆C#代码安装我们公司的Office 2003和2007加载项的一个解决方案。也许它可以为您工作。

This is probably too little too late, but here's a solution I've done for installing our company's office 2003 and 2007 addins using a small bit of C# code. Maybe it could work for you.

我使用o2003pia和o2007pia安装的产品代码:

I use the Product Codes for both the o2003pia and the o2007pia installations which are:

2003: {91490409-6000-11D3-8CFE-0150048383C9}

2007: {50120000-1105-0000- 0000-0000000FF1CE}

然后,通过调用MSI API可以获得每个安装状态。以下是一个查找2003的示例:

Then, by calling the MSI API you can get the install state for each. Here's an example of finding the 2003:

[DllImport("msi.dll")]
    private static extern MsiInstallState MsiQueryProductState
        (string productGuid);
    [DllImport("msi.dll")]
    private static extern uint MsiGetProductInfo
        (string productGuid, string propertyName, StringBuilder valueBuffer, ref Int32 bufferSize);

    bool IsPia2003Installed()
    {
        MsiInstallState state = MsiQueryProductState("{91490409-6000-11D3-8CFE-0150048383C9}");

        return (state == MsiInstallState.msiInstallStateDefault);
    }

如果您正在完成设置项目中的所有内容(我假设您正在使用Visual Studio?),然后您可以添加Windows Installer Search启动条件,以检查上述ProductCodes。如果满意,您可以运行安装PIA的自定义操作。

If you're trying to accomplish all of this entirely inside the setup project (I assume you're using Visual Studio?) then you can add a "Windows Installer Search" launch condition that checks for the above mentioned ProductCodes. If it's satisfied you can run a custom action that installs the PIAs.

有关此解决方案的更多信息,我建议从这里开始 here

For more information on this solution I'd suggest starting here here.

这篇关于.NET部署Office 2003可再分发主要互操作程序集(o2003pia.msi)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆