Re: [WiX-users] Calling a function of one file into a wix file.

2007-09-18 Thread David Stindl
Hi,
I'm using a solution, which I found somewhere on the internet and it
works fine. Works only for .NET Installer implementation DLL. Here is
the fragment of our company's wikipedia for creation of WIX
installations, which I created:
---
Running .NET installer classes
Incorporating managed Custom Actions in WiX is a relatively simple
task. However, you have to pay attention to a few details to avoid
ending up with a headache just trying to figure out what's wrong with
the script.

The first thing you have to do is make sure that the installer class
was in the package, so if there is a file reference for the assembly
with the installer type:



What's worth noting here is the specific Id for the file - because it
is necessary to reference that specific file later in the script.
To setup WiX to execute a managed installer class as a Custom Action,
we use 'InstallUtil'. This tool can be run from the command-line
('installutil.exe'). We use the WiX CAQuietExec custom action to run
the console application - we have to include binary "wixca.dll" to
support this functionality in our installation:



Setting up the Custom Action is simple, albeit not trivial. The Custom
Actions are calls to installutil. An advice is to always check these
using "InstallUtil.exe" via the command-line, to make sure they're
working ok. The best solution is to create fragment with installutil
support and then do simly reference from main installation code:

http://schemas.microsoft.com/wix/2003/01/wi";>
   
   
   
   
   
   
   
   
   
   
 
 
 
 
 
 
 
 
   
   


Here's the convention for identifying the binaries that this fragment expects:

The binary file must have the Id:
{SomeFile}.File
The compoment that contains this file must have the Id:
{SomeFile}.Component
'FILE' token will be replaced with {SomeFile}.
Good file and component Ids:
MyFile.exe.File
foobar1.File
MyFile.exe.Component
foobar1.Component
Bad file Ids:
foobar1
file1.whatever
foobar1.Cooomponeeent
The Simple code, which use this fragment then looks like this:

http://schemas.microsoft.com/wix/2006/wi";>
 
   
   
   
   
 
   
 
 
   

   
 


The fragment InstallUtilFragment then looks like this:


http://schemas.microsoft.com/wix/2003/01/wi";>
   
  
   
   
   
   
   
   
   
   
 
 
 
 
 
 
 
 
   
   


---

2007/9/18, chandan Koushik <[EMAIL PROTECTED]>:
>
>
> Alexei wrote:
> >
> >  And bear in mind that if you wish to simply run the custom action when
> > the installer is started then you would have to schedule it - instead of
> > attaching it to a GUI component.
> Thanks for your reply ,could you please provide a sample of how can i
> schedule the custom action.
>
>
> --
> View this message in context: 
> http://www.nabble.com/Calling-a-function-of-one-file-into-a-wix-file.-tf4247450.html#a12758697
> Sent from the wix-users mailing list archive at Nabble.com.
>
>
> -
> This SF.net email is sponsored by: Microsoft
> Defy all challenges. Microsoft(R) Visual Studio 2005.
> http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/
> ___
> WiX-users mailing list
> WiX-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/wix-users
>

-
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/
___
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users


Re: [WiX-users] Calling a function of one file into a wix file.

2007-09-18 Thread chandan Koushik


Alexei wrote:
> 
>  And bear in mind that if you wish to simply run the custom action when
> the installer is started then you would have to schedule it - instead of
> attaching it to a GUI component.
Thanks for your reply ,could you please provide a sample of how can i
schedule the custom action.


-- 
View this message in context: 
http://www.nabble.com/Calling-a-function-of-one-file-into-a-wix-file.-tf4247450.html#a12758697
Sent from the wix-users mailing list archive at Nabble.com.


-
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/
___
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users


Re: [WiX-users] Calling a function of one file into a wix file.

2007-08-13 Thread Alexei


chandan Koushik wrote:
> 
> Is it possible to have a function [say
> f1() ] in one file which can be called from a main wix file
> 

Sounds like you're after a Custom Action which calls a function from a dll.
Have a look  http://www.tramontana.co.hu/wix/lesson10.php here  for a quick
overview of how to set up the WiX source to invoke a custom action from a
DLL. And bear in mind that if you wish to simply run the custom action when
the installer is started then you would have to schedule it - instead of
attaching it to a GUI component.


chandan Koushik wrote:
> 
> Based on the content  of the function the corresponding features can be
> installedon the system. Can this be achieved in Wix
> 

Although I don't think you can inspect the return value of a function
(however I may be talking nonsense) you CAN use 
http://msdn2.microsoft.com/en-us/library/aa370134.aspx MsiGetProperty()  and  
http://msdn2.microsoft.com/en-us/library/aa370391.aspx MsiSetProperty()  to
set public WiX properties that you can then use as conditions to set the
default level of a Feature - thereby achieving the same effect.

-- 
View this message in context: 
http://www.nabble.com/Calling-a-function-of-one-file-into-a-wix-file.-tf4247450.html#a12123966
Sent from the wix-users mailing list archive at Nabble.com.


-
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >>  http://get.splunk.com/
___
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users


Re: [WiX-users] Calling a function of one file into a wix file.

2007-08-10 Thread Karthik Krishnan
Chandan,

WiX doesn't really have functions, but you can conditionally install
features and components. Take a look at the Component Element in the WiX
Schema, and search google for examples of people using it.

On 8/10/07, Chandan Koushik <[EMAIL PROTECTED]> wrote:
>
>  Hi,
>
>
>
> Hi I am Using wix3.0 version. Is it possible to have a function [say f1()
> ] in one file which can be called from a main wix file; Based on the content
>  of the function the corresponding features can be installedon the system.
> Can this be achieved in Wix
>
>
>
> Suggestions regarding this would be helpful.
>
>
>
> Regards,
>
> Chandan
>
>
>
> -
> This SF.net email is sponsored by: Splunk Inc.
> Still grepping through log files to find problems?  Stop.
> Now Search log events and configuration files using AJAX and a browser.
> Download your FREE copy of Splunk now >>  http://get.splunk.com/
> ___
> WiX-users mailing list
> WiX-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/wix-users
>
>
-
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >>  http://get.splunk.com/___
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users


[WiX-users] Calling a function of one file into a wix file.

2007-08-10 Thread Chandan Koushik
Hi,

 

Hi I am Using wix3.0 version. Is it possible to have a function [say
f1() ] in one file which can be called from a main wix file; Based on
the content  of the function the corresponding features can be
installedon the system. Can this be achieved in Wix

 

Suggestions regarding this would be helpful.

 

Regards,

Chandan

 

-
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >>  http://get.splunk.com/___
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users