whchan
4th October 2007 12:56 UTC
How to detect Office 2003 PIA
Hi,
I'm migrating an installer of excel COM addin from visual studio setup project to NSIS. It's been quite good so far until i work on the Office PIA (Primary Interop Assembly) detection and installation.
In visual studio setup project, there're ways for us to make use of the piacheck.exe to add pre-requisite for office 2003 PIA, and we can use "launch condition" to check against the excel 2003's PIA's component ID.
After hours of search, i find no way to do the same thing in NSIS. Could someone here provide me some help on detecting Office/Excel 2003 PIA?
Reggie
kichik
4th October 2007 13:49 UTC
A quick Google search for piacheck.exe suggests it's an executable used to register add-ins. It accepts a GUID on the command line and seems to register it as an add-in. So, execute piacheck.exe and pass your GUID as an argument. You can use ExecWait for that.
whchan
4th October 2007 14:18 UTC
Thanks for the quick reply!
it seems piacheck is checking the MSI's component ID, but which function should i use to call it? running it in command prompt doesn't print anything.
Also, i have problem in using ExecWait for O2003PIA.msi, from the log, it seems it is run, but from add/remove program, it's not installed.
the O2003PIA.msi can be obtained at http://www.microsoft.com/downloads/d...displaylang=en
if this url is hidden in the reply, google "office 2003 PIA" the first entry will let you download the file.
ExecWait for the other msi, exe are working fine (e.g. kb908002 patch), but specifically the O2003PIA is having problem with it. As i'm new to NSIS, i have no idea how to debug this issue... if someone knows what went wrong, pls point me to the right direction, thx!
kichik
4th October 2007 14:22 UTC
You should use ExecWait to run piacheck.exe. I don't know anything about this program, so I can't tell if it should print anything.
To install MSI packages, execute msiexec with ExecWait. See the two following Wiki pages for examples.
http://nsis.sourceforge.net/Embedding_other_installers
http://nsis.sourceforge.net/Uninstalling_a_previous_MSI
If the MSI itself is giving you problems, it's already in the realm of the MSI and not NSIS. You can verify this by running the exact msiexec line you'd run with ExecWait in cmd.exe.
whchan
5th October 2007 06:18 UTC
ExecWait works well! Thanks so much!
I'm using registry check now, and will try out using PIACheck.exe with ExecWait later today.
Thanks a lot for your ultraquick replies!