Post by ThomasHi Adrian,
Thanks for ur response.
Is there is any way to edit the pcp file automatically rather than
manually ? Even in ORCA u have to manualla open the PCP file. I wanted it to
edited programmatically, like thru any command and set the values inside the
pcp file.
Thanks & Regs,
Thomas
Yes. Remember PCP is an MSI file so you can use any method to
programmatically modify a PCP that you could with any other MSI file. I've
personally used C++ and VBscript to create/modify PCP files.
From vbscript point of view there is a handy sample script called
WiRunSQL.vbs found in the Windows SDK. This let's you run arbitrary SQL
commands against an MSI file from the command line. Combine that with some
UPDATE or INSERT INTO queries and you can do anything you want in a PCP
file.
For example to add a new UpgradedImages row you could use a query like this
one:
INSERT INTO `UpgradedImages` ( `Upgraded`, `MsiPath`,`Family` ) VALUES
( "UP1", "Path to msi", "F1" )
Add in the script to the query and you've got easy update method:
set "QUERY=INSERT INTO `UpgradedImages` ( `Upgraded`, `MsiPath`,`Family` )
VALUES ( "UP1", "Path to msi", "F1" )"
cscript //nologo "WiRunSQL.vbs" msipath "%QUERY%"
Sincerely,
Adrian Accinelli