Discussion:
edit pcp
(too old to reply)
Thomas
2006-05-24 13:03:02 UTC
Permalink
Is there any way to edit a PCP(PatchCreationProperties) file thru VBScript
rather than editing it thru Installation tool like Installshield or WIX
toolkit ??



Thanks & Regards,
Sudhakar
Adrian Accinelli
2006-05-29 02:09:23 UTC
Permalink
Post by Thomas
Is there any way to edit a PCP(PatchCreationProperties) file thru VBScript
rather than editing it thru Installation tool like Installshield or WIX
toolkit ??
Thanks & Regards,
Sudhakar
The PCP file is actually just a MSI file with a different schema. As such
you can use ORCA (or any MSI editor), or any of the Windows Installer SDK
sample VBS scripts on the PCP files.

Sincerely,
Adrian Accinelli
Thomas
2006-05-31 09:54:01 UTC
Permalink
Hi 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
Post by Adrian Accinelli
Post by Thomas
Is there any way to edit a PCP(PatchCreationProperties) file thru VBScript
rather than editing it thru Installation tool like Installshield or WIX
toolkit ??
Thanks & Regards,
Sudhakar
The PCP file is actually just a MSI file with a different schema. As such
you can use ORCA (or any MSI editor), or any of the Windows Installer SDK
sample VBS scripts on the PCP files.
Sincerely,
Adrian Accinelli
Adrian Accinelli
2006-05-31 15:46:23 UTC
Permalink
Post by Thomas
Hi 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
Dennis Bareis
2006-06-01 07:25:02 UTC
Permalink
Post by Thomas
Hi 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.
You could try my MAKEMSI tool

Bye,
Dennis
Dennis Bareis [MVP] (***@KillSpam.gmail.com)
http://users.cyberone.com.au/dbareis/index.htm
Freeware Windows Installer creation tool (+ "ORCA automation"):
http://users.cyberone.com.au/dbareis/makemsi.htm
Thomas
2006-06-06 13:03:02 UTC
Permalink
My question is very simple.
I created
Base.msi
QFE1.msp
QFE2.msp
ServicePack.msp
My requirement is while installing the ServicePack.msp, it should remove the
patches QFE1.msp and QFE2.msp.
I'm able to achieve this thru the command in CMD prompt "Msiexec.exe /p
SP.msp REINSTALL=ALL REINSTALLMODE=omus
MSIPATCHREMOVE=GUID_for_QFE1;GUID_|for_QFE2".

But if I set the "MSIPATCHREMOVE=GUID1;GUID2" in CommandLine properties of
the ServicePack PatchTemplate(PCP) file it is not taking.
Even I set the ProcessCMDLine to Yes
I dont want to execute this in command line. I wanted the msp itself

Pls. help me in this regard.

Regards,
Thomas
Post by Dennis Bareis
Post by Thomas
Hi 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.
You could try my MAKEMSI tool
Bye,
Dennis
http://users.cyberone.com.au/dbareis/index.htm
http://users.cyberone.com.au/dbareis/makemsi.htm
Adrian Accinelli
2006-06-08 20:07:18 UTC
Permalink
Post by Thomas
My question is very simple.
I created
Base.msi
QFE1.msp
QFE2.msp
ServicePack.msp
My requirement is while installing the ServicePack.msp, it should remove the
patches QFE1.msp and QFE2.msp.
I'm able to achieve this thru the command in CMD prompt "Msiexec.exe /p
SP.msp REINSTALL=ALL REINSTALLMODE=omus
MSIPATCHREMOVE=GUID_for_QFE1;GUID_|for_QFE2".
But if I set the "MSIPATCHREMOVE=GUID1;GUID2" in CommandLine properties of
the ServicePack PatchTemplate(PCP) file it is not taking.
Even I set the ProcessCMDLine to Yes
I dont want to execute this in command line. I wanted the msp itself
Pls. help me in this regard.
Regards,
Thomas
Explicitly removing patches is unnecessary with the new supersedence model
of Windows Installer patches. QFE1 and QFE2 can be superseded by the
Service Pack. As such their internal transform changes will no longer be
applied and only the transform changes from the Service Pack are used.

The only reason I could see to do what want would be so that an "uninstall
patch" custom action is run. What's the point - just add the same
capabilities into a custom action that is contained within the Service Pack
and have it conditioned on the fact one or both of the previous QFEs were
installed. You can use Msi patch querying on the product as an immediate
custom action to check if the offending QFEs are there.

If you are dead set on use MSIPATCHREMOVE then wrap your MSP in an exe than
ensures the command line that you require.

Sincerely,
Adrian Accinelli

Continue reading on narkive:
Loading...