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

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

问题描述

有没有人在那里居然成功地创建了prerequisitie为o2003.msi?

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

有一个很多的人在那里问到这个问题,但我找不到任何人究竟是谁成功。我发现了一些非常复杂的解决方案,你需要COMPLE为其索里可能会或可能不会提供的.cpp文件的地方。我甚至想complie其中之一,但在目标机器上...了配置错误: - (

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.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.

和第二个问题,不管previous一个结果:怎么样的机器与Office 2007? 02203.msi抱怨的Office 2003没有安装,所以似乎有很多事情我需要为了创建一个工作安装程序的Office共享加载项做......任何人都经历同样的噩梦?

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?

更新:这似乎是PIA的Office.Core /office.dll这是真正的东西拿到追求的目标机器上。没有一个复杂的解决方案(我知道我可以去上班,如果我把一些精力的话)谈到如何检测这个特定的文件,只是初步评估为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#$ C小一点安装我们公司的办公室2003年和2007年的加载项进行$ C。也许它可以为你工作。

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.

我用的是产品codeS同时为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}

然后,通过调用API MSI你可以安装状态,为每个。这里是找到一个例子,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?),那么你可以添加检查上述产品$ C一个Windows安装程序搜索启动条件$ CS。如果它满足您可以运行安装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.

有关这个解决方案我建议你从这里开始的这里

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

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

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