Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Getting Product code from msp file

1,406 views
Skip to first unread message

Eric Lacroix

unread,
May 14, 2003, 8:10:51 AM5/14/03
to
Hi,

Is there any way to extract the product code from a patch? I try to use
the installer interface with the method SummaryInformation but i always got
empty property. I know that the msp file have this information, i do open
the msp file with OLE strutured storage and i see this information inside
the patch.

Any one have any idees ?

Thanks.
Eric


Re~Silient

unread,
May 14, 2003, 2:34:08 PM5/14/03
to
Eric,
What about ORCA... can it open an MSP

--
Re~Silient
WPO11
WinXP SP1 Home
"Eric Lacroix" <elac...@cch.ca> wrote in message
news:OfjxdHhG...@TK2MSFTNGP10.phx.gbl...

Luke S

unread,
May 14, 2003, 6:34:29 PM5/14/03
to
You should be able to get the information by using the Msi functions. Make
sure you specify the MSIDBOPEN_PATCHFILE flag when using MsiOpenDatabase.

"Re~Silient" <resi...@videotron.ca> wrote in message
news:#paQpdkG...@TK2MSFTNGP10.phx.gbl...

Eric Lacroix

unread,
May 16, 2003, 10:59:20 AM5/16/03
to
My point was to extract the product code of the original product from a non
installed patch.

Openning an installer database does not give any good result because
information about the patch are not stored inside table.

Just try to drag an msp file over orca and you will see what in it.

thanks,
eric


"Luke S" <sur...@ca.com> wrote in message
news:ueBm%23jmGD...@TK2MSFTNGP10.phx.gbl...

Carolyn Napier [MSFT]

unread,
May 28, 2003, 9:07:26 PM5/28/03
to
The wisuminf.vbs script should be able to display the summary information contents of the MSP.
Additionally, Script code similar to the following should work (note that I'm not a VBScript
programming expert so this may require some changes -- additionally I flagged some TODO aspects if
you want to completely handle all types of patches)

=========================
Set Installer = WScript.CreateObject("WindowsInstaller.Installer")
Set SummaryInfo = Installer.SummaryInformation("d:\patches\simple\msps\simple.msp", 0)


' List of target products in the patch is stored in the Template property of the Summary Information
stream
' Target products could be a multiple delimited list (by ';')

' TODO: process the returned value as a list
strTargetProductList = SummaryInfo.Property(7)
MsgBox "Patch Target Product List = " & strTargetProductList

' Revision property of summary information stream contains the PatchCode followed by the GUIDs of
' patches to obsolete (no delimiter)

' TODO: process the returned value as a possible list
strPatchCode = SummaryInfo.Property(9)
MsgBox "Patch Code = " & strPatchCode
=========================

Also, Luke is correct as far as the MSI API functions go. The patch information related to target
products for the patch is stored in the Template property of the summary information stream. You
could either use MsiGetSummaryInformation with the handle to the database (i.e. patch) obtained with
the MsiOpenDatabase call that also specified MSIDBOPEN_PATCHFILE. Alternatively you could simply
call MsiGetSummaryInformation with the patch to the patch.

--
- Carolyn Napier
Microsoft Windows Installer Team

Check out the Windows Installer FAQ at:
<http://www.microsoft.com/windows2000/community/centers/management/msi_faq.asp>

Please do not send email directly to the alias used to post to the newsgroup. The alias is for
newsgroup purposes only. This posting is provided "AS IS" with no warranties, and confers no
rights. Use of included script samples are subject to the terms specified at
http://www.microsoft.com/info/cpyright.htm

"Eric Lacroix" <elac...@cch.ca> wrote in message news:OHhQDv7G...@tk2msftngp13.phx.gbl...

0 new messages