What does a verbose log say? Also, what you have written will ALWAYS set the property to the local computer's name during the execute sequence no matter what was in the registry.
Do you want something more like this? <SetProperty Before='InstallInitialize' Sequence='execute' Id='SQLSERVER' Value='[ComputerName]'>NOT SQLSERVER</SetProperty> <Property Id='SQLSERVER' Secure='yes'> <RegistrySearch Id='RepositoryLocation' Key='SOFTWARE\MyCompany\MyProduct\MyVersion\MyComponent' Name='RepositoryServer' Root='HKLM' Type='raw' /> </Property> Replace "execute" with "both" if you display/use SQLSERVER in your UI sequence. -----Original Message----- From: James D. Pinkston [mailto:jdpink...@gmail.com] Sent: Monday, November 08, 2010 1:24 PM To: wix-users@lists.sourceforge.net Subject: Re: [WiX-users] Referencing other property as default value of a property? Hello, Does anyone know the solution to this? I have a similar problem with setting the property through a CustomAction. I understand Sunghwa was getting the "action" error because "Id" was not defined. I no longer get the error but the property is not being populated. This is what I have <CustomAction Id="SetSQLServer" Property="SQLSERVER" Value="[ComputerName]"/> <Property Id='SQLSERVER'> <RegistrySearch Id='RepositoryLocation' Key='SOFTWARE\MyCompany\MyProduct\MyVersion\MyComponent' Name='RepositoryServer' Root='HKLM' Type='raw' /> </Property> <InstallExecuteSequence> <Custom Action='SetSQLServer' Before='InstallInitialize' /> </InstallExecuteSequence> SQLSERVER is always empty. I would like SQLSERVER to default to the ComputerName if the reg key doesn't exist. It seems like the SetSQLServer action is not being called but I am not sure. Any ideas on how to fix this or debug it would be appreciated. /JD From: Sunghwa Jin Sent: Tuesday, June 26, 2007 3:01 PM To: 'WiX-users@lists.sourceforge.net' Subject: Referencing other property as default value of a property? Hi all, I am trying to set a property called SQLSERVER like below. What I am trying to do is that I take registry value as its value if exist. If it doesn't exist, I should take computername as default value. And user should be able to override this value by specifying it in msiexec.exe's command line. <Property Id='SQLSERVER' Value='[ComputerName]'> <RegistrySearch Id='RepositoryLocation' Key='SOFTWARE\MyCompany\MyProduct\MyVersion\MyComponent' Name='RepositoryServer' Root='HKLM' Type='raw' /> When I build this, I get exception like below: Myserver.wxs(50) : warning CNDL1077 : The 'SQLSERVER' Property contains '[ComputerName]' in its value which is an illegal reference to another property. If this value is a string literal, not a property reference, please ignore this warning. To set a property with the value of another property, use a CustomAction with Property and Value attributes. I am trying to figure out I can do this by using CustomAction, but adding below generates another compilation error: <CustomAction Property='SQLSERVER' Value='[COMPUTERNAME]'/> candle.exe : error CNDL0001 : Cannot set column 'Action' with a null value because this is a required field. Can someone kindly teach me how I can solve this? Thanks, Sunghwa ------------------------------------------------------------------------- This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ _______________________________________________ WiX-users mailing list WiX-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wix-users ------------------------------------------------------------------------- This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ _______________________________________________ WiX-users mailing list WiX-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wix-users ---------------------------------------------------------------------------- -- The Next 800 Companies to Lead America's Growth: New Video Whitepaper David G. Thomson, author of the best-selling book "Blueprint to a Billion" shares his insights and actions to help propel your business during the next growth cycle. Listen Now! http://p.sf.net/sfu/SAP-dev2dev _______________________________________________ WiX-users mailing list WiX-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wix-users ------------------------------------------------------------------------------ The Next 800 Companies to Lead America's Growth: New Video Whitepaper David G. Thomson, author of the best-selling book "Blueprint to a Billion" shares his insights and actions to help propel your business during the next growth cycle. Listen Now! http://p.sf.net/sfu/SAP-dev2dev _______________________________________________ WiX-users mailing list WiX-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wix-users