Forgot to add this link:

http://msdn.microsoft.com/library/en-us/msi/setup/obtaining_context_info
rmation_for_deferred_execution_custom_actions.asp?frame=true
 

> -----Original Message-----
> From: [EMAIL PROTECTED] 
> [mailto:[EMAIL PROTECTED] On Behalf Of 
> Arnette, Bill
> Sent: Wednesday, November 08, 2006 11:02 AM
> To: wix-users@lists.sourceforge.net
> Subject: Re: [WiX-users] Property name to be used in MsiGetProperty
> 
> Your CAs are all deferred so there is a very small subset of 
> properties
> you can get with MsiGetProperty.  Parameters are passed to deferred
> custom actions in a property called CustomActionData.  To set
> CustomActionData, you have to use another custom action to set a
> property with the same name as the deferred custom action to a string
> with the value(s) you want to pass to the custom action.  If you have
> multiple data items you need to pass, you will need to pass 
> them like a
> command line that your CA code will parse
> 
> 
> <Property Id="CA_Arguments2" Value="1" />
> <!-- This CA sets a property that matches the name of the CA 
> to which we
> want to
>      pass data (CA2).  Here we are setting the property with a switch
> and an
>      argument/value pair -->
> <CustomAction Id="SetCustomActionDataForCA2" Return="check"
>    Property="CA2"     Value="/switch1  /arg2=value2" />
> 
> <!-- CAFunction2 will get the CA2 property by using "CustomActionData"
> in the
>      MsiGetProperty() call and parse the returned string like 
> a command
> line
>      to retrieve the two arguments -->
> <CustomAction Id="CA2" Execute="deferred" Return="check"
>    BinaryKey="mycustom.dll" DllEntry="CAFunction2"
>    HideTarget="no"/>
> 
> <InstallExecuteSequence>
>    <Custom Action="SetCustomActionDataForCA2" Before="CA2" />
>    <Custom Action="CA2" After="InstallInitialize" />  
> </InstallExecuteSequence>
> 
> Then in CAFunction2() retrieve CustomActionData with:
>  MsiGetProperty (hInstall, L"CustomActionData", szActionData,
> &dwActionData);
> 
> CAFunction2 will have to parse szActionData like a commandline to
> retrieve the arguments.
> 
> 
> 
> 
> > > <Custom Action="CA_SetProperty2" After="SomeOtherCA">< 
> somecondition
> > >> </Custom>
> > > <Custom Action="CA2" After="CA_SetProperty2">< somecondition
> > ></Custom>
> > -----Original Message-----
> > From: [EMAIL PROTECTED] 
> > [mailto:[EMAIL PROTECTED] On Behalf Of 
> > Pallavi Patrutkar
> > Sent: Wednesday, November 08, 2006 6:01 AM
> > To: wix-users@lists.sourceforge.net
> > Cc: Rob Hamflett
> > Subject: Re: [WiX-users] Property name to be used in MsiGetProperty
> > 
> > I wrote the code according to the sample given in online MSDN doc.
> > 
> > So, you have to call MsiGetProperty() method twice.
> > In 1st call, you get the length of the actual value, passed as a 4th
> > parameter of MsiGetProperty() and return value comes as 
> > ERROR_MORE_DATA
> > which is correct according to doc.
> > In 2nd call, you have to pass this length as 4th parameter 
> and for 3rd
> > parameter, construct a string array with the size as above 
> length +1.
> > This call returns ERROR_SUCCESS, which is also according to the doc.
> > 
> > So, I am wondering whether I am using the correct string as a 2nd
> > parameter to MsiGetProperty() or not.
> > 
> > Can you tell me if there is any problem in this call as I 
> > have mentioned
> > in my previous email?
> > 
> > Regards,
> > Pallavi.
> > 
> > -----Original Message-----
> > From: [EMAIL PROTECTED]
> > [mailto:[EMAIL PROTECTED] On Behalf Of Rob
> > Hamflett
> > Sent: Wednesday, November 08, 2006 4:17 PM
> > To: wix-users@lists.sourceforge.net
> > Subject: Re: [WiX-users] Property name to be used in MsiGetProperty
> > 
> > Ah, OK.  It just wasn't clear from your first post.  What's 
> the return
> > value for MsiGetProperty?
> > 
> > Rob
> > 
> > Pallavi Patrutkar wrote:
> > > Hi,
> > > 
> > > I have a customaction and property as defined below in WIX file
> > > 
> > > 
> > > 
> > > <Property Id="CA_Arguments1" Value="1" />
> > > <CustomAction Id=" CA_SetProperty1" Return="check"
> > > Property="CA_Arguments1"  Value="<somecommand1>" />
> > > <CustomAction Id="CA1" Execute="deferred" Return="check"
> > > BinaryKey="mycustom.dll" DllEntry="CAFunction1" HideTarget="no"/>
> > >                   
> > > <Property Id="CA_Arguments2" Value="1" />
> > > <CustomAction Id=" CA_SetProperty2" Return="check"
> > > Property="CA_Arguments2"  Value="<somecommand2>" />
> > > <CustomAction Id="CA2" Execute="deferred" Return="check"
> > > BinaryKey="mycustom.dll" DllEntry="CAFunction2"
> > > HideTarget="no"/>
> > > 
> > > 
> > > <Custom Action="CA_SetProperty1" After=" SomeOtherCA">< 
> > somecondition
> > >> </Custom>
> > > <Custom Action="CA1" 
> > After="CA_SetProperty1"><somecondition></Custom>
> > > <Custom Action="CA_SetProperty2" After="SomeOtherCA">< 
> somecondition
> > >> </Custom>
> > > <Custom Action="CA2" After="CA_SetProperty2">< somecondition
> > ></Custom>
> > > -----------------------------------
> > > I am calling method in C++ source file as below - 
> > > 
> > > MsiGetProperty (hInstall, L"CA_Arguments1", szActionData,
> > > &dwActionData);
> > > MsiGetProperty (hInstall, L"CA_Arguments2", szActionData,
> > > &dwActionData);
> > > 
> > > But, I am getting dwActionData value as zero. And I nowhere 
> > got in any
> > > documentation that which string from the above WIX code 
> > should be used
> > > as 2nd argument for the above method. So, I am just 
> > wondering whether
> > I
> > > am using correct string or not.
> > > 
> > > Please help.
> > > 
> > > Regards,
> > > Pallavi.
> > > 
> > > 
> > > 
> > > -----Original Message-----
> > > From: [EMAIL PROTECTED]
> > > [mailto:[EMAIL PROTECTED] On Behalf Of Rob
> > > Hamflett
> > > Sent: Wednesday, November 08, 2006 2:33 PM
> > > To: wix-users@lists.sourceforge.net
> > > Subject: Re: [WiX-users] Property name to be used in 
> MsiGetProperty
> > > 
> > > How are you passing a custom value to your DLL?  I 
> thought that you
> > > could only receive a handle to 
> > > the MSI package.  Are you sure the property name in the DLL is
> > correct?
> > > 
> > > Rob
> > > 
> > > Pallavi Patrutkar wrote:
> > >> Hello,
> > >>
> > >>  
> > >>
> > >> I am trying to pass a property to a method in a DLL. But 
> I am not 
> > >> getting the actual property value in my DLL through 
> MsiGetProperty.
> > >>
> > >> It returns the length of parameter as zero. But still 
> > method returns 
> > >> successfully.
> > >>
> > >> Can you tell me exactly which string from WXS file 
> should I pass to
> > > this 
> > >> method as a 2^nd parameter to get the correct property value?
> > >>
> > >>  
> > >>
> > >> Thank you,
> > >>
> > >>  
> > >>
> > >> Regards,
> > >>
> > >> Pallavi.
> > >>
> > >>
> > >>
> > >
> > --------------------------------------------------------------
> > ----------
> > >>
> > >
> > --------------------------------------------------------------
> > ----------
> > > -
> > >> Using Tomcat but need to do more? Need to support web services,
> > > security?
> > >> Get stuff done quickly with pre-integrated technology to 
> make your
> > job
> > > easier
> > >> Download IBM WebSphere Application Server v.1.0.1 based on Apache
> > > Geronimo
> > >
> > http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&;
> > dat=121642
> > >>
> > >>
> > >
> > --------------------------------------------------------------
> > ----------
> > >> _______________________________________________
> > >> WiX-users mailing list
> > >> WiX-users@lists.sourceforge.net
> > >> https://lists.sourceforge.net/lists/listinfo/wix-users
> > > 
> > > 
> > >
> > --------------------------------------------------------------
> > ----------
> > > -
> > > Using Tomcat but need to do more? Need to support web services,
> > > security?
> > > Get stuff done quickly with pre-integrated technology to 
> > make your job
> > > easier
> > > Download IBM WebSphere Application Server v.1.0.1 based on Apache
> > > Geronimo
> > >
> > http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&;
> > dat=121642
> > > _______________________________________________
> > > WiX-users mailing list
> > > WiX-users@lists.sourceforge.net
> > > https://lists.sourceforge.net/lists/listinfo/wix-users
> > > 
> > >
> > --------------------------------------------------------------
> > ----------
> > -
> > > Using Tomcat but need to do more? Need to support web services,
> > security?
> > > Get stuff done quickly with pre-integrated technology to 
> > make your job
> > easier
> > > Download IBM WebSphere Application Server v.1.0.1 based on Apache
> > Geronimo
> > >
> > http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&;
> > dat=121642
> > 
> > 
> > --------------------------------------------------------------
> > ----------
> > -
> > Using Tomcat but need to do more? Need to support web services,
> > security?
> > Get stuff done quickly with pre-integrated technology to 
> make your job
> > easier
> > Download IBM WebSphere Application Server v.1.0.1 based on Apache
> > Geronimo
> > http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&;
> > dat=121642
> > _______________________________________________
> > WiX-users mailing list
> > WiX-users@lists.sourceforge.net
> > https://lists.sourceforge.net/lists/listinfo/wix-users
> > 
> > --------------------------------------------------------------
> > -----------
> > Using Tomcat but need to do more? Need to support web 
> > services, security?
> > Get stuff done quickly with pre-integrated technology to make 
> > your job easier
> > Download IBM WebSphere Application Server v.1.0.1 based on 
> > Apache Geronimo
> > http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&;
> > dat=121642
> > _______________________________________________
> > WiX-users mailing list
> > WiX-users@lists.sourceforge.net
> > https://lists.sourceforge.net/lists/listinfo/wix-users
> > 
> 
> --------------------------------------------------------------
> -----------
> Using Tomcat but need to do more? Need to support web 
> services, security?
> Get stuff done quickly with pre-integrated technology to make 
> your job easier
> Download IBM WebSphere Application Server v.1.0.1 based on 
> Apache Geronimo
> http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&;
> dat=121642
> _______________________________________________
> WiX-users mailing list
> WiX-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/wix-users
> 

-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users

Reply via email to