Quantcast
Channel: wixsharp Discussions Rss Feed
Viewing all articles
Browse latest Browse all 1354

New Post: Conditionally creating SqlDatabase only by initial Installation, not by Major Upgrade

$
0
0
Thank you for your reply.
I have implemented your suggestion and it works fine by Major Upgrade.
But now by new Installation, the SqlDatabase not installed too.
I don’t know how to get which Condition should be on first position:
INSTALLING = “yes”.
See please my Upgrade and SqlDatabase Component fragments.
My question is, how could I get key value for first part of Condition?
<Upgrade Id="3338faaa-8c9c-43c3-b5ac-3f737d6590fd">
  <UpgradeVersion Minimum="0.0.0.0" Maximum="1.0.2.10010" IncludeMinimum="yes" IncludeMaximum="no" Property="UPGRADEFOUND" />
  <UpgradeVersion Minimum="1.0.2.10010" IncludeMinimum="no" Property="NEWPRODUCTFOUND" />
</Upgrade>

<Component Id="SqlDatabase1" Guid="3338faaa-8c9c-43c3-b5ac-3f73970b42ec" KeyPath="yes">
        <SqlDatabase Id="DATABASE_UNIQUED_IDENTIFIER" Database="[DATABASENAME]" Server="[SERVERADDRESS]" CreateOnInstall="yes" Instance="[SERVERINSTANCE]" User="SQLUser" xmlns="http://schemas.microsoft.com/wix/SqlExtension">
          <SqlString Id="SqlString" SQL=" SQL SCRIPT " ExecuteOnInstall="yes" />

          <SqlScript Id="GenerateDatabase" BinaryKey="GenerateDatabase" ExecuteOnInstall="yes" />
        </SqlDatabase>

        <Condition>NEWPRODUCTFOUND="yes" AND UPGRADEFOUND="no"</Condition>
      </Component>

Viewing all articles
Browse latest Browse all 1354

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>