I am writing a custom action with the following code. The Challenge is save
information during installation.
[CustomAction]
public static ActionResult MyCA(Session session)
{
DBInformation obj_DBInformation = new DBInformation();
                obj_DBInformation.Server = session["SERVERNAMEPROP"];
                DBConfigurator.AddDatabaseToCollection(obj_DBInformation);
                DBConfigurator.StoreConfig("C:\myOutput.xml");
                return ActionResult.Success;
}
now in Product.wxs:
<Property Id="SERVERNAMEPROP"></Property>
    <CustomAction Id="CAStoreInfo" BinaryKey="MyCA" DllEntry="MyCA" />
    <Binary Id="MyCA" SourceFile="SaveInformation.dll" />

and in myConnectionDlg.wxs
<Control Id="ServerEdit" Type="Edit" X="45" Y="84" Width="220" Height="15"
Property="SERVERNAMEPROP" Text="{80}">

This code is not working, i mean not creating a .xml file as output
(myOutput.xml). In myOutput.xml the entries must come which user give during
installation.
Please help me to accomplish it.

Thanks
Best Regards
Adnan






Kusuma Sudheer Kumar (Tata Consultancy Services) wrote:
> 
> Session properties are the way to store the information.
> I can create some properties in my Wix code and update the values like
> session["PROPERTY1"]="jjjjj";
> 
> Can you provide more info as what are you planning to perform?
> 
> Thanks,
> Sudheer
> BGE Build Team (X 34482)
> 
> 
> -----Original Message-----
> From: danimian [mailto:miand...@gmail.com] 
> Sent: Tuesday, October 06, 2009 2:41 PM
> To: wix-users@lists.sourceforge.net
> Subject: [WiX-users] write custom action in csharp for storing information
> 
> 
> Hi,
> in tutorial there is an example of csharp custom action for checking Key
> which look like this
> public class SampleCheckPID
>   {
> 
>     [CustomAction]
>     public static ActionResult CheckPID(Session session)
>     {
>       string Pid = session["PIDKEY"];
>       session["PIDACCEPTED"] = Pid.StartsWith("1") ? "1" : "0";
>       return ActionResult.Success;
>     }
> 
> But how to write a custom action in csharp for storing information during
> installation? or which changes need to be done in the above code?
> 
> Best Regards
> Adnan
> 
> -- 
> View this message in context:
> http://n2.nabble.com/write-custom-action-in-csharp-for-storing-information-tp3773873p3773873.html
> Sent from the wix-users mailing list archive at Nabble.com.
> 
> ------------------------------------------------------------------------------
> Come build with us! The BlackBerry&reg; 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&#45;12, 2009. Register
> now&#33;
> http://p.sf.net/sfu/devconf
> _______________________________________________
> WiX-users mailing list
> WiX-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/wix-users
> 
> 
> ------------------------------------------------------------------------------
> Come build with us! The BlackBerry&reg; 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&#45;12, 2009. Register
> now&#33;
> http://p.sf.net/sfu/devconf
> _______________________________________________
> WiX-users mailing list
> WiX-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/wix-users
> 
> 

-- 
View this message in context: 
http://n2.nabble.com/write-custom-action-in-csharp-for-storing-information-tp3773873p3774591.html
Sent from the wix-users mailing list archive at Nabble.com.

------------------------------------------------------------------------------
Come build with us! The BlackBerry&reg; 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&#45;12, 2009. Register now&#33;
http://p.sf.net/sfu/devconf
_______________________________________________
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users

Reply via email to