fairyberry
Level 3

Confused About Component Rule

I have two products: 1 ) Standard and 2 ) Premium.

The target directory for both products is the Sample folder as below.

[ProgramFilesFolder]Sample\Standard
[ProgramFilesFolder]Sample\Premium

Each product has the unique package, product and upgrade code.

However, they share the same ComponentId for the Sample folder.
They also have the same RegistryComponentID for different registry key.
(HKLM\SOFTWARE\abc\standard, and HKLM\SOFTWARE\abc\premium)

[table="width: 500"]

ProducName
Standard
Premium


PackageCode
AA
BB


Version
12.1
12.1


ProductCode
CC
DD


UpgradeCode
EE
FF


Component 1 for samplefolder
GG
GG


Component 2 for registry key
HH
HH

[/table]

I have a bad feeling that this isn't the best practice but can't really say what problems this might cause.

Can someone please clarify?

Thank you for your help in advance.
Labels (1)
0 Kudos
7 Replies
vlakshmi
Level 4

We cannot have two components with the same Component ID in the same package.You can change it manually by clicking on the ellipses in the Component Code property
0 Kudos
DebbieL
Level 17

If I am understanding your scenario correctly, it sounds like you are breaking component rules, as described in Changing the Component Code. For more information, see What happens if the component rules are broken?
0 Kudos
fairyberry
Level 3

vlakshmi,

These components are not from the same package..They are from different products.

Debbie,

Thanks for the link, though I have read the link before I posted..and still had hard times understanding

Are you suggesting that ComponentId should be different for each product (Standard and Premium) even when both products are installed in the same target directory, the samplefolder? I guess the RegistryComponentID should be also different?
0 Kudos
DebbieL
Level 17

Are you saying that you are installing a component with the same ID to Sample\Standard for the Standard product and to Sample\Premium for the Premium product?

And you are using the same ID for a component that installs different registry data, depending on whether it is Standard or Premium?

Are you doing something to prevent the Standard product from being installed on the same machine that has the Premium product? And are you preventing the Premium product from being installed on a system that has Standard? If this is the case, the scenario that you are describing is probably OK.
0 Kudos
fairyberry
Level 3

Are you saying that you are installing a component with the same ID to Sample\Standard for the Standard product and to Sample\Premium for the Premium product? ----Yes

And you are using the same ID for a component that installs different registry data, depending on whether it is Standard or Premium? ----Yes

Are you doing something to prevent the Standard product from being installed on the same machine that has the Premium product? And are you preventing the Premium product from being installed on a system that has Standard? If this is the case, the scenario that you are describing is probably OK. ----NO...

I guess I understand now. It's not good idea to share the same ID for the component in both cases.

Does it mean that the component name for samplefolder or registry data should be also unique? Or it does not matter?

[table="width: 500]

ProductName
Premium
Standard


component name for Samplefolder
Comp1
Comp1


ID
100
200


[/table]
0 Kudos
DebbieL
Level 17

You should be able to use the same component names with different component IDs.
0 Kudos
fairyberry
Level 3

Debbie,

Thank you so much for your help and clarification. I appreciate it.
0 Kudos