AppDeploy.com

 


How to find CompressedProductCode

Click here to associate this thread with a Package KB article.
Logged in as: Guest
Users viewing this topic: none
  Printable Version
All Forums >> [AppDeploy Forums] >> Package Development >> How to find CompressedProductCode Page: [1]
Login
Message << Older Topic   Newer Topic >>
How to find CompressedProductCode - 9/15/2005 12:41:41 AM   
jsolanki

 

Posts: 1
Score: 0
Joined: 9/15/2005
Status: offline
Please Open the following link for explaination of the issue.

http://community.installshield.com/showthread.php?t=121198&page=1&pp=5

On this page in the first post sglenden is referring <CompressedProductCode>.

I have noticed that this is not a product Code, UpgradeCode or package code. Its something totally different. What's that GUID known as ? I can only see this GUID after installing the application.

How do I find this code even before I install the application.

Basically I want to overwrite the referenced registry on first installation so self healing or active setup will look for the msi at different location and not from where it was originally installed.

If anybody ccan help me that would be very great.

some solution about this will make my life very easy.


Thanks

Jignesh
Application Repackager
Ministry of Justice
New Zealand.
Post #: 1
RE: How to find CompressedProductCode - 9/15/2005 3:37:12 PM   
Robb Thomas

 

Posts: 18
Score: 0
Joined: 9/8/2005
Status: offline
I have never really heard of or seen any "COMPRESSED" values. The only thing I see are hacked up and/or butchered values in the MSI installers' registry. Ok, I'll give you the pointers to where MSI is storing this stuff. We will start by examining Office 2003 ProductCodes and Package Codes.

For Office 2003 SR0, Opening PRO11.MSI and looking the summary table, you'll find:

Package Code = {6102E382-135B-4261-BA67-F6F09B6A6483} Office 2003 SR0 PRO11.MSI

Now look at the Propterties table you'll find:

ProductCode = {90110409-6000-11D3-8CFE-0150048383C9} Office 2003 SR0 PRO11.MSI

The product code is used to identify the product. You can have Office 2003 SR1 installed on your desktop, but you cannot autoheal from your Office 2003 SR1 because you've been installed using SR0 and then upgraded. You see in order for AUTOHEAL to work with a package, it is the "Package Codes" that must match.

Now lets look at how this ProductCode is stored in the MSI's installers REGISTRY .

Now head on over to Regedit, and open up the registry:

HKEY_CLASSES_ROOT\Installer\Products\9040110900063D11C8EF10054038389C

Under the Products heirachy, you'll see that the key is really the product code all butchered up by microsoft, leemme show you.

Taking the ProductCode as it appears in the PRO11.MSI
{90110409-6000-11D3 - 8C FE-01 50 04 83 83 C9}
reverse each piece - Reverse each byte
{90401109-0006-3D11 - C8 EF-10 50 40 38 83 9C

Putting it all together without any spaces or -'s we get:

{9040110900063D11C8EF10504038839C

Comparing the above with the value with the MSI registry key we see they are the same:

xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx\9040110900063D11C8EF10504038839C
HKEY_CLASSES_ROOT\Installer\Products\9040110900063D11C8EF10054038389C


Yeah, it would have been nice if Microsoft didn't 'butcher' the ID's up, oh well.


So now lets look at how the MSI engine has stored the PackageCode in the registry.
======================================================


Now when you look in the above registry key, you'll find a value...

PackageCode = 283E2016B5311624AB766F0FB9A64638

Again, hashing the bits of {6102E382-135B-4261-BA67-F6F09B6A6483}

{6102E382-135B-4261 - BA67-F6F09B6A6483}
{283E2016-B531-1642 - AB76-6F0FB9A64638
{283E2016B5311642AB766F0FB9A64638

Comparing again with what is stored in the registry value:

xxxxxxxxxxxx = 283E2016B5311642AB766F0FB9A64638
PackageCode = 283E2016B5311624AB766F0FB9A64638

Yup, another microsoft butchered up value.

So the ProductCode, and PackageCode stored in the MSI file must match the ProductCode and PackageCode stored in the MSI Installer's registry keys in order for autohealing to work.


So where does the MSI engine go to heal the package? Simply look at the sourcelist.
============================================================

HKEY_CLASSES_ROOT\Installer\Products\9040110900063D11C8EF10054038389C\SourceList

After locating all this, I was able to build an autoheal point mover script.

Understand that you can't simply edit the sourcelist keys without comparing the PackageCode's first.

I'm not sure if this will help you out, but figure the information would be 'technically' interesting for others with autoheal issues.

Regards,
----- Robb -----




_____________________________

You don't have to be crazy to hit the deploy button, BUT IT SURE HELPS! :)

(in reply to jsolanki)
Post #: 2
RE: How to find CompressedProductCode - 10/30/2008 11:35:58 AM   
theChad

 

Posts: 1
Score: 0
Joined: 9/24/2008
Status: offline
An AutoIt 3 function for the translation:

This will work with or without the braces.

#include <string.au3>
Dim $PC = "{FE2F6A2C-196E-4210-9C04-2B1BC21F07EF}" ;an example
MsgBox(0, "Translate Product Code", $PC & @LF & StringReplace($PC, "-", "", 99) & @LF & _TranslateMSIProductCode($PC), 60) ;a test

Func _TranslateMSIProductCode($ProductCode)
;translates a MSI ProductCode to HKCR\Installer\Products\<TranslatedProductCode>
Local $i, $PC = StringReplace(StringReplace($ProductCode, "}", ""), "{", "")
If StringLen($PC) <> 36 Then
 SetError(2)
 Return $ProductCode
EndIf
Local  $TPC = _StringReverse(StringMid($PC,  1, 8))
$TPC = $TPC & _StringReverse(StringMid($PC, 10, 4))
$TPC = $TPC & _StringReverse(StringMid($PC, 15, 4))
$TPC = $TPC & _StringReverse(StringMid($PC, 20, 2))
$TPC = $TPC & _StringReverse(StringMid($PC, 22, 2))
For $i=25 To 35 Step 2
 $TPC = $TPC & _StringReverse(StringMid($PC, $i, 2))
Next
Return $TPC
EndFunc

(in reply to Robb Thomas)
Post #: 3
RE: How to find CompressedProductCode - 10/30/2008 5:25:36 PM   
AngelD

 

Posts: 2937
Score: 102
Joined: 6/9/2004
From: Sweden
Status: offline
Some more vbscripts for this can be found at http://www.appdeploy.com/messageboards/tm.asp?m=27079&mpage=1&key=&#27079

(in reply to theChad)
Post #: 4
Page:   [1]
All Forums >> [AppDeploy Forums] >> Package Development >> How to find CompressedProductCode Page: [1]
Jump to:





New Messages No New Messages
Hot Topic w/ New Messages Hot Topic w/o New Messages
Locked w/ New Messages Locked w/o New Messages
 Post New Thread
 Reply to Message
 Post New Poll
 Submit Vote
 Delete My Own Post
 Delete My Own Thread
 Rate Posts


Forum Software © ASPPlayground.NET Advanced Edition 2.4.5 ANSI

0.031