Re: [WiX-users] Wix 3.0: link error when using '*' in the component's GUID field
For the test scenario, go to Add/Remove Programs and select "Repair", and make sure that the registry value doesn't change (test from each of the two initial states). Not sure why it doesn't delete, but you could try adding a RemoveRegistryKey element to the same component. -Original Message- From: little.forest [mailto:little.for...@ymail.com] Sent: Thursday, November 05, 2009 5:35 PM To: General discussion for Windows Installer XML toolset. Subject: Re: [WiX-users] Wix 3.0: link error when using '*' in the component's GUID field Thanks Blair. I tried it by using your code example. It works! But I found a problem, after uninstallation, this registry entry is still in the registry. Even if I use "createAndRemoveOnUninstall", it's still there. I checked the uninstall log, it doesn't say if the delete key operation is okay or not: MSI (s) (D0:C0) [17:25:45:891]: Executing op: RegRemoveValue(Name=MyApp 3.0,Value="[INSTALLLOCATION]MyApp30.exe"[RunWhenWindowsStartsArgument],) MSI (s) (D0:C0) [17:25:45:891]: Note: 1: 1402 2: HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Run 3: 2 MSI (s) (D0:C0) [17:25:45:891]: Executing op: RegRemoveKey() What can I do to make sure this registry entry is deleted upon uninstalling? Also, you mentioned "You may need to preserve RUNWHENWINDOWSSTART and restore it during repairs and/or small updates/minor upgrades so that the value doesn't change during a repair." - we use major upgrade, does it matter for us? If so, what is the use case or test scenario to verify our install is fine with this restraint? Thanks. From: Blair To: General discussion for Windows Installer XML toolset. Sent: Friday, October 30, 2009 5:54:06 PM Subject: Re: [WiX-users] Wix 3.0: link error when using '*' in the component's GUID field Identity theft is always such a pain. compone...@guid='*' is required to generate a "stable" guid. That means that if the component's keypath didn't change, it is the same component. As a result, both of your components, which share the exact same keypath, are the same component as far as Windows Installer is concerned (they share the same identity). The value isn't part of the keypath, unfortunately. What you may consider doing instead is (since your components are currently not transitive and are mutually exclusive) is something like this: You may need to preserve RUNWHENWINDOWSSTART and restore it during repairs and/or small updates/minor upgrades so that the value doesn't change during a repair. -Original Message- From: little.forest [mailto:little.for...@ymail.com] Sent: Friday, October 30, 2009 2:27 PM To: wix-users@lists.sourceforge.net Subject: [WiX-users] Wix 3.0: link error when using '*' in the component's GUID field We use Wix 3.0.4805.0. We run into a very strange link error: we have a component that uses "*" as the GUID. But when we link it, it reports an error: error LGHT0204 : ICE08: Component: RegistrySpecial has a duplicate GUID: {A7C1768B-FF73-5DFC-8E76-E810E013F78A} But I searched all of our source code, there is no GUID "{A7C1768B-FF73-5DFC-8E76-E810E013F78A}" defined anywhere. Here is the command line to compile and link it: candle.exe -dRelease -out <.wixobj file> -arch x86 -ext myapp.wxs light.exe -ext -cultures:en-us -out myapp.msi -pdbout -loc Basically, this is what we'd like to do: there is an option called "Start application when Windows starts". If the end user select this option, we'll write the application's file path to a registry entry; if the end user doesn't select this option, we'll also write the entry with a parameter. The logic is just like this: if (RUNWHENWINDOWSSTART) { write registry with "[PATH_TO_APP]" } else { write registry with "[PATH_TO_APP] -bootload" } Here is the code: RUNWHENWINDOWSSTART = 1 I thought "*" will generate GUID for each component. But how come it reports that error? And it's always that ID. What is special about that ID? The interesting thing is, if I delete one of the two components from the code, the compile/link is fine. So it seems the root of the problem is that I'm having these two components at the same time. Why I can't have these two components at the same time? This is really a if-then-else scenario. Maybe I shouldn't have two components to implement the logic? Is there any other way to implement this? Thanks. /Brian __ Looking for the perfect gift? Give the gift of Flickr! http://www.flickr.com/gift/ -- Come build with us! The BlackBerry(R) Developer Conference
Re: [WiX-users] Wix 3.0: link error when using '*' in the component's GUID field
Thanks Blair. I tried it by using your code example. It works! But I found a problem, after uninstallation, this registry entry is still in the registry. Even if I use "createAndRemoveOnUninstall", it's still there. I checked the uninstall log, it doesn't say if the delete key operation is okay or not: MSI (s) (D0:C0) [17:25:45:891]: Executing op: RegRemoveValue(Name=MyApp 3.0,Value="[INSTALLLOCATION]MyApp30.exe"[RunWhenWindowsStartsArgument],) MSI (s) (D0:C0) [17:25:45:891]: Note: 1: 1402 2: HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Run 3: 2 MSI (s) (D0:C0) [17:25:45:891]: Executing op: RegRemoveKey() What can I do to make sure this registry entry is deleted upon uninstalling? Also, you mentioned "You may need to preserve RUNWHENWINDOWSSTART and restore it during repairs and/or small updates/minor upgrades so that the value doesn't change during a repair." - we use major upgrade, does it matter for us? If so, what is the use case or test scenario to verify our install is fine with this restraint? Thanks. From: Blair To: General discussion for Windows Installer XML toolset. Sent: Friday, October 30, 2009 5:54:06 PM Subject: Re: [WiX-users] Wix 3.0: link error when using '*' in the component's GUID field Identity theft is always such a pain. compone...@guid='*' is required to generate a "stable" guid. That means that if the component's keypath didn't change, it is the same component. As a result, both of your components, which share the exact same keypath, are the same component as far as Windows Installer is concerned (they share the same identity). The value isn't part of the keypath, unfortunately. What you may consider doing instead is (since your components are currently not transitive and are mutually exclusive) is something like this: You may need to preserve RUNWHENWINDOWSSTART and restore it during repairs and/or small updates/minor upgrades so that the value doesn't change during a repair. -Original Message- From: little.forest [mailto:little.for...@ymail.com] Sent: Friday, October 30, 2009 2:27 PM To: wix-users@lists.sourceforge.net Subject: [WiX-users] Wix 3.0: link error when using '*' in the component's GUID field We use Wix 3.0.4805.0. We run into a very strange link error: we have a component that uses "*" as the GUID. But when we link it, it reports an error: error LGHT0204 : ICE08: Component: RegistrySpecial has a duplicate GUID: {A7C1768B-FF73-5DFC-8E76-E810E013F78A} But I searched all of our source code, there is no GUID "{A7C1768B-FF73-5DFC-8E76-E810E013F78A}" defined anywhere. Here is the command line to compile and link it: candle.exe -dRelease -out <.wixobj file> -arch x86 -ext myapp.wxs light.exe -ext -cultures:en-us -out myapp.msi -pdbout -loc Basically, this is what we'd like to do: there is an option called "Start application when Windows starts". If the end user select this option, we'll write the application's file path to a registry entry; if the end user doesn't select this option, we'll also write the entry with a parameter. The logic is just like this: if (RUNWHENWINDOWSSTART) { write registry with "[PATH_TO_APP]" } else { write registry with "[PATH_TO_APP] -bootload" } Here is the code: RUNWHENWINDOWSSTART = 1 I thought "*" will generate GUID for each component. But how come it reports that error? And it's always that ID. What is special about that ID? The interesting thing is, if I delete one of the two components from the code, the compile/link is fine. So it seems the root of the problem is that I'm having these two components at the same time. Why I can't have these two components at the same time? This is really a if-then-else scenario. Maybe I shouldn't have two components to implement the logic? Is there any other way to implement this? Thanks. /Brian __ Looking for the perfect gift? Give the gift of Flickr! http://www.flickr.com/gift/ -- Come build with us! The BlackBerry(R) Developer Conference in SF, CA is the only developer event you need to attend this year. Jumpstart your developing skills, take BlackBerry mobile applications to market and stay ahead of the curve. Join us from November 9 - 12, 2009. Register now! http://p.sf.net/sfu/devconference ___ WiX-users mailing list WiX-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wix-users -- Come build with us! The BlackBerry(R) Developer Conference in SF, CA is the only
Re: [WiX-users] Wix 3.0: link error when using '*' in the component's GUID field
(hmm, I really need to post this blog entry) I typically write the value to a registry key and then use a RegistrySearch to read the value back into the Property. That way on repair the value that is on the machine will get written back to the registry (otherwise, repair might reset the value back to its default). On Sat, Oct 31, 2009 at 12:16 AM, little.forest wrote: > Thanks Blair. > > Your code example makes sense. I'm going to try it. > > However, you also said "You may need to preserve RUNWHENWINDOWSSTART and > restore it during repairs > and/or small updates/minor upgrades so that the value doesn't change during > a repair. " - I'm not quite getting this one. > We use major upgrade. I'm not sure this would apply. Could you tell me how > to preserve RUNWHENWINDOWSSTART and restore it? > > Thanks. > > > > > > From: Blair > To: General discussion for Windows Installer XML toolset. < > wix-users@lists.sourceforge.net> > Sent: Fri, October 30, 2009 5:54:06 PM > Subject: Re: [WiX-users] Wix 3.0: link error when using '*' in the > component's GUID field > > Identity theft is always such a pain. > > compone...@guid='*' is required to generate a "stable" guid. That means > that > if the component's keypath didn't change, it is the same component. As a > result, both of your components, which share the exact same keypath, are > the > same component as far as Windows Installer is concerned (they share the > same > identity). The value isn't part of the keypath, unfortunately. > > What you may consider doing instead is (since your components are currently > not transitive and are mutually exclusive) is something like this: > > Before='WriteRegistryValues'> > > Root="HKCU" > Key="Software\Microsoft\Windows\CurrentVersion\Run" > Action="create"> > Type="string" > Name="$(var.ProductName)" > Value='"[INSTALLLOCATION]$(var.FileOutput)"[RunValueArgument]' > KeyPath="yes" > /> > > > > You may need to preserve RUNWHENWINDOWSSTART and restore it during repairs > and/or small updates/minor upgrades so that the value doesn't change during > a repair. > > -Original Message- > From: little.forest [mailto:little.for...@ymail.com] > Sent: Friday, October 30, 2009 2:27 PM > To: wix-users@lists.sourceforge.net > Subject: [WiX-users] Wix 3.0: link error when using '*' in the component's > GUID field > > We use Wix 3.0.4805.0. > > We run into a very strange link error: we have a component that uses "*" as > the GUID. But when we link it, it reports an error: > error LGHT0204 : ICE08: Component: RegistrySpecial has a duplicate GUID: > {A7C1768B-FF73-5DFC-8E76-E810E013F78A} > > > But I searched all of our source code, there is no GUID > "{A7C1768B-FF73-5DFC-8E76-E810E013F78A}" defined anywhere. > > Here is the command line to compile and link it: > candle.exe -dRelease -out <.wixobj file> -arch x86 -ext > myapp.wxs > light.exe -ext -cultures:en-us -out myapp.msi -pdbout > -loc > > Basically, this is what we'd like to do: > there is an option called "Start application when Windows starts". If the > end user select this option, we'll write the application's file path to a > registry entry; if the end user doesn't select this option, we'll also > write > the entry with a parameter. The logic is just like this: > if (RUNWHENWINDOWSSTART) { > write registry with "[PATH_TO_APP]" > } else { > write registry with "[PATH_TO_APP] -bootload" > } > > Here is the code: > > RUNWHENWINDOWSSTART = 1 > Root="HKCU" > Key="Software\Microsoft\Windows\CurrentVersion\Run" > Action="create"> > Type="string" > Name="$(var.ProductName)" > Value='"[INSTALLLOCATION]$(var.FileOutput)"' > KeyPath="yes" > /> > > > > > > Root="HKCU" > Key="Software\Microsoft\Windows\CurrentVersion\Run" > Action="create"> > Type="string" > Name="$(var.ProductName)" > Value='"[INSTALLLOCATION]$(var.FileOutput)" -bootload' > KeyPath="yes" > /> > > > > I thought "*" will generate GUID for each component. But how come it > reports > that error? And it's always that ID. What is special about that ID? The > interesting thing is, if I delete one of the two components from the code, > the co
Re: [WiX-users] Wix 3.0: link error when using '*' in the component's GUID field
Thanks Blair. Your code example makes sense. I'm going to try it. However, you also said "You may need to preserve RUNWHENWINDOWSSTART and restore it during repairs and/or small updates/minor upgrades so that the value doesn't change during a repair. " - I'm not quite getting this one. We use major upgrade. I'm not sure this would apply. Could you tell me how to preserve RUNWHENWINDOWSSTART and restore it? Thanks. From: Blair To: General discussion for Windows Installer XML toolset. Sent: Fri, October 30, 2009 5:54:06 PM Subject: Re: [WiX-users] Wix 3.0: link error when using '*' in the component's GUID field Identity theft is always such a pain. compone...@guid='*' is required to generate a "stable" guid. That means that if the component's keypath didn't change, it is the same component. As a result, both of your components, which share the exact same keypath, are the same component as far as Windows Installer is concerned (they share the same identity). The value isn't part of the keypath, unfortunately. What you may consider doing instead is (since your components are currently not transitive and are mutually exclusive) is something like this: You may need to preserve RUNWHENWINDOWSSTART and restore it during repairs and/or small updates/minor upgrades so that the value doesn't change during a repair. -Original Message- From: little.forest [mailto:little.for...@ymail.com] Sent: Friday, October 30, 2009 2:27 PM To: wix-users@lists.sourceforge.net Subject: [WiX-users] Wix 3.0: link error when using '*' in the component's GUID field We use Wix 3.0.4805.0. We run into a very strange link error: we have a component that uses "*" as the GUID. But when we link it, it reports an error: error LGHT0204 : ICE08: Component: RegistrySpecial has a duplicate GUID: {A7C1768B-FF73-5DFC-8E76-E810E013F78A} But I searched all of our source code, there is no GUID "{A7C1768B-FF73-5DFC-8E76-E810E013F78A}" defined anywhere. Here is the command line to compile and link it: candle.exe -dRelease -out <.wixobj file> -arch x86 -ext myapp.wxs light.exe -ext -cultures:en-us -out myapp.msi -pdbout -loc Basically, this is what we'd like to do: there is an option called "Start application when Windows starts". If the end user select this option, we'll write the application's file path to a registry entry; if the end user doesn't select this option, we'll also write the entry with a parameter. The logic is just like this: if (RUNWHENWINDOWSSTART) { write registry with "[PATH_TO_APP]" } else { write registry with "[PATH_TO_APP] -bootload" } Here is the code: RUNWHENWINDOWSSTART = 1 I thought "*" will generate GUID for each component. But how come it reports that error? And it's always that ID. What is special about that ID? The interesting thing is, if I delete one of the two components from the code, the compile/link is fine. So it seems the root of the problem is that I'm having these two components at the same time. Why I can't have these two components at the same time? This is really a if-then-else scenario. Maybe I shouldn't have two components to implement the logic? Is there any other way to implement this? Thanks. /Brian __ Looking for the perfect gift? Give the gift of Flickr! http://www.flickr.com/gift/ -- Come build with us! The BlackBerry(R) Developer Conference in SF, CA is the only developer event you need to attend this year. Jumpstart your developing skills, take BlackBerry mobile applications to market and stay ahead of the curve. Join us from November 9 - 12, 2009. Register now! http://p.sf.net/sfu/devconference ___ WiX-users mailing list WiX-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wix-users -- Come build with us! The BlackBerry(R) Developer Conference in SF, CA is the only developer event you need to attend this year. Jumpstart your developing skills, take BlackBerry mobile applications to market and stay ahead of the curve. Join us from November 9 - 12, 2009. Register now! http://p.sf.net/sfu/devconference ___ WiX-users mailing list WiX-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wix-users __ The new Internet Explorer® 8 - Faster, safer, easier. Optimized for Yahoo! Get it Now for Free! at http://downloads.yahoo.com/ca/internetexplorer/ ---
Re: [WiX-users] Wix 3.0: link error when using '*' in the component's GUID field
Identity theft is always such a pain. compone...@guid='*' is required to generate a "stable" guid. That means that if the component's keypath didn't change, it is the same component. As a result, both of your components, which share the exact same keypath, are the same component as far as Windows Installer is concerned (they share the same identity). The value isn't part of the keypath, unfortunately. What you may consider doing instead is (since your components are currently not transitive and are mutually exclusive) is something like this: You may need to preserve RUNWHENWINDOWSSTART and restore it during repairs and/or small updates/minor upgrades so that the value doesn't change during a repair. -Original Message- From: little.forest [mailto:little.for...@ymail.com] Sent: Friday, October 30, 2009 2:27 PM To: wix-users@lists.sourceforge.net Subject: [WiX-users] Wix 3.0: link error when using '*' in the component's GUID field We use Wix 3.0.4805.0. We run into a very strange link error: we have a component that uses "*" as the GUID. But when we link it, it reports an error: error LGHT0204 : ICE08: Component: RegistrySpecial has a duplicate GUID: {A7C1768B-FF73-5DFC-8E76-E810E013F78A} But I searched all of our source code, there is no GUID "{A7C1768B-FF73-5DFC-8E76-E810E013F78A}" defined anywhere. Here is the command line to compile and link it: candle.exe -dRelease -out <.wixobj file> -arch x86 -ext myapp.wxs light.exe -ext -cultures:en-us -out myapp.msi -pdbout -loc Basically, this is what we'd like to do: there is an option called "Start application when Windows starts". If the end user select this option, we'll write the application's file path to a registry entry; if the end user doesn't select this option, we'll also write the entry with a parameter. The logic is just like this: if (RUNWHENWINDOWSSTART) { write registry with "[PATH_TO_APP]" } else { write registry with "[PATH_TO_APP] -bootload" } Here is the code: RUNWHENWINDOWSSTART = 1 I thought "*" will generate GUID for each component. But how come it reports that error? And it's always that ID. What is special about that ID? The interesting thing is, if I delete one of the two components from the code, the compile/link is fine. So it seems the root of the problem is that I'm having these two components at the same time. Why I can't have these two components at the same time? This is really a if-then-else scenario. Maybe I shouldn't have two components to implement the logic? Is there any other way to implement this? Thanks. /Brian __ Looking for the perfect gift? Give the gift of Flickr! http://www.flickr.com/gift/ -- Come build with us! The BlackBerry(R) Developer Conference in SF, CA is the only developer event you need to attend this year. Jumpstart your developing skills, take BlackBerry mobile applications to market and stay ahead of the curve. Join us from November 9 - 12, 2009. Register now! http://p.sf.net/sfu/devconference ___ WiX-users mailing list WiX-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wix-users -- Come build with us! The BlackBerry(R) Developer Conference in SF, CA is the only developer event you need to attend this year. Jumpstart your developing skills, take BlackBerry mobile applications to market and stay ahead of the curve. Join us from November 9 - 12, 2009. Register now! http://p.sf.net/sfu/devconference ___ WiX-users mailing list WiX-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wix-users