[wix-users] Custom Action to set a Wix Variable
Sanket Panchamia
psanket at gmail.com
Mon Sep 21 22:21:40 PDT 2015
Hi Brian,
Is this the correct way to do?
In custom action,
session["TEST_VAR"] = "Test"
In wxs file.
<WixVariable Id="testVar" Value="[TEST_VAR]" />
Thanks
Sanket
On Mon, Sep 21, 2015 at 5:22 PM, Brian Enderle <brianke at gmail.com> wrote:
> Example using variable as a condition:
>
> In the custom action:
>
> session["FOXPROPATH_VALID"] = "1";
>
> and in your wxs file:
>
> <Publish Event="NewDialog" Value="VerifyReadyDlg"
> Order="4"><![CDATA[FOXPROPATH_VALID = "1"]]></Publish>
>
>
>
>
> Example updating an XML file element with variable:
>
> In the custom action:
>
> session["ENCRYPTED_PASSWORD"] =
> PasswordConfig.encryptPassword(_password);
>
> and in your wxs file:
>
> <util:XmlFile Id="UpdateEncryptedPassword"
> Action="setValue"
> File="[CONFIGFOLDER]config.xml"
> ElementPath="//DelphiaConfig/DatabaseInfo/Password"
> Value="[ENCRYPTED_PASSWORD]"
> Sequence="3" />
>
>
>
> Brian
>
> If you can't explain it simply, you don't understand it well enough. -
> Albert Einstein
>
> On Mon, Sep 21, 2015 at 7:24 AM, Sanket Panchamia <psanket at gmail.com>
> wrote:
>
> > Hi,
> >
> > Is there a way to write a custom action (c# or vb) that sets a variable
> > that
> > can be used back in the main wix project.wxs file?
> >
> > Thanks
> > --
> > Regards
> > Sanket Panchamia
> > +91-9742836299
> >
> > <https://twitter.com/p_sanket> <http://www.facebook.com/spanchamia>
> > <http://www.linkedin.com/in/psanket>
> >
> > ____________________________________________________________________
> > WiX Toolset Users Mailing List provided by FireGiant
> > http://www.firegiant.com/
> >
>
> ____________________________________________________________________
> WiX Toolset Users Mailing List provided by FireGiant
> http://www.firegiant.com/
>
--
Regards
Sanket Panchamia
+91-9742836299
<https://twitter.com/p_sanket> <http://www.facebook.com/spanchamia>
<http://www.linkedin.com/in/psanket>
More information about the wix-users
mailing list