Hi,

This is what I ended up doing:

-> Query all registry keys in setup.wixobj with xpath
(//w:tab...@name='Registry']/w:row/w:field[starts-with(., 'reg')])
-> Add each key to hashtable if not already in hashtable
-> If key exists in hashtable generate a new key (actually I just append _1,
_2, ... if necessary) and change it in setup.wixobj

This builds and results in a correct registry.

Best regards,
JB

2010/9/13 Bryan Reich <bryan.re...@microsoft.com>

> It uses the id, root, key, and name, but not value.
> The default progId is written under the class key and the only difference
> is the value, so the generated ID is the same.
> Don't know about the resolution and what build to expect it in. Hope
> someone who knows more about the resolution and the build process can opine
> on that.
> --
> Bryan
>
> ________________________________________
> From: Renegade Angel [renegade.an...@gmail.com]
> Sent: Monday, September 13, 2010 7:34 AM
> To: General discussion for Windows Installer XML toolset.
> Subject: Re: [WiX-users] Light error for COM dll with multiple prog id's
> for thesame class
>
> The function GenerateIdentifier in CompilerCore.cs seems to generate an id
> based on component id, root, key and name.
> I have different keys I would think (one is Chilkat.AppSettings, and the
> other ChilkatUtil.AppSettings), however the same
> id's are generated.
>
> Also tried with latest 3.5 beta and 3.6.0910.0 and 3.6.0905.0, the same
> error is reported. However, on sf.net the bug is marked
> as resolved ?
>
> The option to translate the prog id into its own registryvalue nodes is
> rather difficult to do in my case because my build tool auto-generates the
> wix code and it should be future proof.
>
> Thanks for the suggestions so far.
>
> 2010/9/13 Bryan Reich <bryan.re...@microsoft.com>
>
> >
> >
> https://sourceforge.net/tracker/?func=detail&aid=2927773&group_id=105970&atid=642714
> >
> > You may have to upgrade to newer bits or break out the second progId into
> > its constituant registry keys outside of the class element in the wix to
> > work around the bug.
> > --
> > Bryan
> >
> > ________________________________________
> > From: Pally Sandher [pally.sand...@iesve.com]
> > Sent: Monday, September 13, 2010 6:33 AM
> > To: General discussion for Windows Installer XML toolset.
> > Subject: Re: [WiX-users] Light error for COM dll with multiple prog id's
> > for    thesame class
> >
> > Ah my apologies. I haven't looked at the Registry Table in a built MSI
> > using InstEd or Orca in a while so I hadn't noticed the auto generated
> > Id's in there for Class & Prog ID's.
> >
> > To the best of my knowledge, WiX generates those ID's using some
> > algorithm which is almost guaranteed to generate the same value every
> > time for that file/folder/component etc. in theory you should be able to
> > modify the ProgId's ID or Description elements or something similar so
> > it generates unique ones however someone with more in-depth knowledge of
> > the inner workings of candle.exe (Rob M, Bob A et al) should be able to
> > advise in a greater capacity.
> >
> > For now I'd try changing the Id's & see if you can fool it into
> > generating more unique Id's for the Registry Table.
> >
> > Good Luck.
> >
> > Palbinder Sandher
> > Software Deployment & IT Administrator
> > T: +44 (0) 141 945 8500
> > F: +44 (0) 141 945 8501
> >
> > http://www.iesve.com
> > **Design, Simulate + Innovate with the <Virtual Environment>**
> > Integrated Environmental Solutions Limited. Registered in Scotland No.
> > SC151456
> > Registered Office - Helix Building, West Of Scotland Science Park,
> > Glasgow G20 0SP
> > Email Disclaimer
> >
> > -----Original Message-----
> > From: Renegade Angel [mailto:renegade.an...@gmail.com]
> > Sent: 13 September 2010 13:25
> > To: General discussion for Windows Installer XML toolset.
> > Subject: Re: [WiX-users] Light error for COM dll with multiple prog id's
> > for thesame class
> >
> > As it appears I'm already using heat with the -suid switch. The
> > reg06989...
> > seems to be an id
> > that is generated by candle, I can only find it in setup.wixobj.
> >
> > Should I post process the obj file and change certain id's and enforce
> > uniqueness to fix this ?
> >
> > Thanks,
> > JB
> >
> > 2010/9/13 Pally Sandher <pally.sand...@iesve.com>
> >
> > > Try using the -suid switch when you run heat to get more readable ID's
> >
> > > generated rather than 'reg06989E0C50B7888525E711A46A9A609B'.
> > > The code you've pasted isn't the problem. The error message says
> > > you've got duplicated Id's in the RegistryTable, it has nothing to do
> > > with Class & Prog Id's. Make sure none of your RegistryKey or
> > > RegistryValue Id's are duplicates & if they are, modify them.
> > >
> > > Palbinder Sandher
> > > Software Deployment & IT Administrator
> > > T: +44 (0) 141 945 8500
> > > F: +44 (0) 141 945 8501
> > >
> > > http://www.iesve.com
> > > **Design, Simulate + Innovate with the <Virtual Environment>**
> > > Integrated Environmental Solutions Limited. Registered in Scotland No.
> > > SC151456
> > > Registered Office - Helix Building, West Of Scotland Science Park,
> > > Glasgow G20 0SP Email Disclaimer
> > >
> > > -----Original Message-----
> > > From: Renegade Angel [mailto:renegade.an...@gmail.com]
> > > Sent: 13 September 2010 10:36
> > > To: wix-users@lists.sourceforge.net
> > > Subject: [WiX-users] Light error for COM dll with multiple prog id's
> > > for thesame class
> > >
> > > Dear all,
> > >
> > > I've been dealing with this issue when using heat to generate the
> > > registry information for COM-dll's.
> > > (I'm running 3.0.5419.0 of the WiX toolset)
> > >
> > > For instance:
> > >
> > > Running heat on the file ChilKatUtil.dll results in:
> > >
> > > ...
> > >              <Class Id="{C497BA35-66A4-4818-8AF0-6928A3EEEB68}"
> > > Context="InprocServer32" Description="Chilkat AppSettings"
> > > ThreadingModel="apartment" Version="1.0" Insertable="yes"
> > > Programmable="yes"
> > > Control="yes">
> > >  *               <ProgId Id="Chilkat.AppSettings.1"
> > Description="Chilkat
> > > AppSettings">*
> > > *                  <ProgId Id="Chilkat.AppSettings"
> > Description="Chilkat
> > > AppSettings" />*
> > > *                </ProgId>*
> > >                <ProgId Id="ChilkatUtil.AppSettings.1"
> > > Description="Chilkat AppSettings">
> > >                  <ProgId Id="ChilkatUtil.AppSettings"
> > > Description="Chilkat AppSettings" />
> > >                </ProgId>
> > >              </Class>
> > > ...
> > >
> > > This compiles fine, but when linking I get the error: "error LGHT0130
> > :
> > > The primary key 'reg06989E0C50B7888525E711A46A9A609B' is duplicated in
> >
> > > table 'Registry'.  Please remove one of the entries or rename a part
> > > of the primary key to avoid the collision."
> > >
> > > When I remove section in bold it links fine, and the following entries
> >
> > > are written to the registry:
> > >
> > > [HKEY_USERS\S-1-5-21-746137067-2139871995-1417001333-500\Software\Clas
> > > se
> > > s\ChilkatUtil.AppSettings]
> > > @="Chilkat AppSettings"
> > > [HKEY_USERS\S-1-5-21-746137067-2139871995-1417001333-500\Software\Clas
> > > se
> > > s\ChilkatUtil.AppSettings\CLSID]
> > > @="{C497BA35-66A4-4818-8AF0-6928A3EEEB68}"
> > > [HKEY_USERS\S-1-5-21-746137067-2139871995-1417001333-500\Software\Clas
> > > se
> > > s\ChilkatUtil.AppSettings\CurVer]
> > > @="ChilkatUtil.AppSettings.1"
> > > [HKEY_USERS\S-1-5-21-746137067-2139871995-1417001333-500\Software\Clas
> > > se
> > > s\ChilkatUtil.AppSettings.1]
> > > @="Chilkat AppSettings"
> > > [HKEY_USERS\S-1-5-21-746137067-2139871995-1417001333-500\Software\Clas
> > > se
> > > s\ChilkatUtil.AppSettings.1\CLSID]
> > > @="{C497BA35-66A4-4818-8AF0-6928A3EEEB68}"
> > >
> > > However, what I need in the registry is the following (I need both
> > > prog
> > > id's):
> > >
> > > [HKEY_USERS\S-1-5-21-746137067-2139871995-1417001333-500\Software\Clas
> > > se
> > > s\Chilkat.AppSettings]
> > > @="Chilkat AppSettings"
> > > [HKEY_USERS\S-1-5-21-746137067-2139871995-1417001333-500\Software\Clas
> > > se
> > > s\Chilkat.AppSettings\CLSID]
> > > @="{C497BA35-66A4-4818-8AF0-6928A3EEEB68}"
> > > [HKEY_USERS\S-1-5-21-746137067-2139871995-1417001333-500\Software\Clas
> > > se
> > > s\Chilkat.AppSettings\CurVer]
> > > @="Chilkat.AppSettings.1"
> > > [HKEY_USERS\S-1-5-21-746137067-2139871995-1417001333-500\Software\Clas
> > > se
> > > s\Chilkat.AppSettings.1]
> > > @="Chilkat AppSettings"
> > > [HKEY_USERS\S-1-5-21-746137067-2139871995-1417001333-500\Software\Clas
> > > se
> > > s\Chilkat.AppSettings.1\CLSID]
> > > @="{C497BA35-66A4-4818-8AF0-6928A3EEEB68}"
> > > [
> > > [HKEY_USERS\S-1-5-21-746137067-2139871995-1417001333-500\Software\Clas
> > > se
> > > s\ChilkatUtil.AppSettings]
> > > @="Chilkat AppSettings"
> > > [HKEY_USERS\S-1-5-21-746137067-2139871995-1417001333-500\Software\Clas
> > > se
> > > s\ChilkatUtil.AppSettings\CLSID]
> > > @="{C497BA35-66A4-4818-8AF0-6928A3EEEB68}"
> > > [HKEY_USERS\S-1-5-21-746137067-2139871995-1417001333-500\Software\Clas
> > > se
> > > s\ChilkatUtil.AppSettings\CurVer]
> > > @="ChilkatUtil.AppSettings.1"
> > > [HKEY_USERS\S-1-5-21-746137067-2139871995-1417001333-500\Software\Clas
> > > se
> > > s\ChilkatUtil.AppSettings.1]
> > > @="Chilkat AppSettings"
> > > [HKEY_USERS\S-1-5-21-746137067-2139871995-1417001333-500\Software\Clas
> > > se
> > > s\ChilkatUtil.AppSettings.1\CLSID]
> > > @="{C497BA35-66A4-4818-8AF0-6928A3EEEB68}"
> > >
> > > The funny thing is, with version 3.0.5006.0 I get the correct result,
> > > but it is a beta and I would much rather use an official release to
> > > build our MSI. Something must have changed to light between the 2
> > > versions.
> > > I have tried with 3.5 versions also, but it breaks on the same linker
> > > error.
> > >
> > > I found this post from last year:
> > > http://windows-installer-xml-wix-toolset.687559.n2.nabble.com/Possible
> > > -b ug-with-duplicate-registry-keys-td3214414.html
> > > That person had the same problem, but I cannot reach him for comments.
> > > Also there seem to have been no replies on his question.
> > >
> > > Anyone has an idea ?
> > >
> > > Thanks in advance.
> > > JB
> > > ----------------------------------------------------------------------
> > > --
> > > ------
> > > Start uncovering the many advantages of virtual appliances and start
> > > using them to simplify application deployment and accelerate your
> > > shift to cloud computing http://p.sf.net/sfu/novell-sfdev2dev
> > > _______________________________________________
> > > WiX-users mailing list
> > > WiX-users@lists.sourceforge.net
> > > https://lists.sourceforge.net/lists/listinfo/wix-users
> > >
> > >
> > >
> > >
> > > ----------------------------------------------------------------------
> > > -------- Start uncovering the many advantages of virtual appliances
> > > and start using them to simplify application deployment and accelerate
> >
> > > your shift to cloud computing http://p.sf.net/sfu/novell-sfdev2dev
> > > _______________________________________________
> > > WiX-users mailing list
> > > WiX-users@lists.sourceforge.net
> > > https://lists.sourceforge.net/lists/listinfo/wix-users
> > >
> > ------------------------------------------------------------------------
> > ------
> > Start uncovering the many advantages of virtual appliances and start
> > using them to simplify application deployment and accelerate your shift
> > to cloud computing http://p.sf.net/sfu/novell-sfdev2dev
> > _______________________________________________
> > WiX-users mailing list
> > WiX-users@lists.sourceforge.net
> > https://lists.sourceforge.net/lists/listinfo/wix-users
> >
> >
> >
> >
> >
> ------------------------------------------------------------------------------
> > Start uncovering the many advantages of virtual appliances
> > and start using them to simplify application deployment and
> > accelerate your shift to cloud computing
> > http://p.sf.net/sfu/novell-sfdev2dev
> > _______________________________________________
> > WiX-users mailing list
> > WiX-users@lists.sourceforge.net
> > https://lists.sourceforge.net/lists/listinfo/wix-users
> >
> >
> ------------------------------------------------------------------------------
> > Start uncovering the many advantages of virtual appliances
> > and start using them to simplify application deployment and
> > accelerate your shift to cloud computing
> > http://p.sf.net/sfu/novell-sfdev2dev
> > _______________________________________________
> > WiX-users mailing list
> > WiX-users@lists.sourceforge.net
> > https://lists.sourceforge.net/lists/listinfo/wix-users
> >
>
> ------------------------------------------------------------------------------
> Start uncovering the many advantages of virtual appliances
> and start using them to simplify application deployment and
> accelerate your shift to cloud computing
> http://p.sf.net/sfu/novell-sfdev2dev
> _______________________________________________
> WiX-users mailing list
> WiX-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/wix-users
>
> ------------------------------------------------------------------------------
> Start uncovering the many advantages of virtual appliances
> and start using them to simplify application deployment and
> accelerate your shift to cloud computing
> http://p.sf.net/sfu/novell-sfdev2dev
> _______________________________________________
> WiX-users mailing list
> WiX-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/wix-users
>
------------------------------------------------------------------------------
Start uncovering the many advantages of virtual appliances
and start using them to simplify application deployment and
accelerate your shift to cloud computing.
http://p.sf.net/sfu/novell-sfdev2dev
_______________________________________________
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users

Reply via email to