On Mon, Nov 8, 2010 at 2:11 PM, Blair <os...@live.com> wrote:

> What does a verbose log say?
>

I am afraid it did not say much there are the references I could to to the
applicable elements

---
Action start 12:11:27: AppSearch.
AppSearch: Property: SQLSERVER, Signature: RepositoryLocation
---
Property(C): ComputerName = WRK2387
---


>
> 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>
>

Yes I would like SQLSERVER to default to ComputerName if the registry key
does not exist.


>
> <Property Id='SQLSERVER' Secure='yes'>
>     <RegistrySearch Id='RepositoryLocation'
>
> Key='SOFTWARE\MyCompany\MyProduct\MyVersion\MyComponent'
>                      Name='RepositoryServer'
>                      Root='HKLM'
>                      Type='raw'
>                      />
> </Property>
>

I tried the following

<Product>
    <SetProperty Before='InstallInitialize' Sequence='both' Id='SQLSERVER'
Value='[ComputerName]'>NOT SQLSERVER</SetProperty>

   <Property Id='SQLSERVER'>
      <RegistrySearch Id='RepositoryLocation'
                      Key='SOFTWARE\MyCompany\
MyProduct\MyVersion\MyComponent'
                      Name='RepositoryServer'
                      Root='HKLM'
                      Type='raw'
                      />
   </Property>
</Product>

and it resulted in the following error

    [light] light.exe : error LGHT0001 : Found an ActionRow with a
non-existent Before action.
    [light]
    [light] Exception Type: System.InvalidOperationException
    [light]
    [light] Stack Trace:
    [light]    at
Microsoft.Tools.WindowsInstallerXml.Linker.SequenceActionRow(WixActionRow
actionRow, WixActionRowCollection requiredActionRows)
    [light]    at
Microsoft.Tools.WindowsInstallerXml.Linker.SequenceActions(RowCollection
actionRows, RowCollection suppressActionRows)
    [light]    at
Microsoft.Tools.WindowsInstallerXml.Linker.Link(SectionCollection sections,
ArrayList transforms, OutputType expectedOutputType)
    [light]    at
Microsoft.Tools.WindowsInstallerXml.Tools.Light.Run(String[] args)

That was with wix3.0. I tried moving the SetProperty to the
InstallExecuteSequence section but it not available there.


>
> Replace "execute" with "both" if you display/use SQLSERVER in your UI
> sequence.
>

I do and I did. I also tried this

<Product>
   <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' After='AppSearch'>NOT
SQLSERVER</Custom>
   </InstallExecuteSequence>
</Product>

and again the SQLSERVER is empty when is displayed in the UI. Not sure where
to go from here. Thank you your help.



> -----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
>
------------------------------------------------------------------------------
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

Reply via email to