Re: [WiX-users] WiX-users Digest, Vol 40, Issue 92

2009-09-21 Thread Oscar Newkerk
You should be able to use the Session that is passed into your custom action 
code.  Then just do Session.Log("Message") to write your custom message to the 
log file.

Note that this does not work if your custom action is invoked from a dialog.  
In that case, you can have your custom action write/modify a property that will 
be written to the log file.

Thanks

Oscar


-Original Message-
From: wix-users-requ...@lists.sourceforge.net 
[mailto:wix-users-requ...@lists.sourceforge.net] 
Sent: Monday, September 21, 2009 12:03 AM
To: wix-users@lists.sourceforge.net
Subject: WiX-users Digest, Vol 40, Issue 92

Send WiX-users mailing list submissions to
wix-users@lists.sourceforge.net

To subscribe or unsubscribe via the World Wide Web, visit
https://lists.sourceforge.net/lists/listinfo/wix-users
or, via email, send a message with subject or body 'help' to
wix-users-requ...@lists.sourceforge.net

You can reach the person managing the list at
wix-users-ow...@lists.sourceforge.net

When replying, please edit your Subject line so it is more specific than "Re: 
Contents of WiX-users digest..."

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


Re: [WiX-users] C#, two custom actions from one DLL

2009-09-17 Thread Oscar Newkerk
I'm guessing that you need to modify the second entrypoint in the custom action 
code to add the [CustomAction] attribute to the method.  So:

public class CustomActions
{
[CustomAction]
public static ActionResult CustomActionA(Session session)
{
session.Log("Begin CustomAction A");

return ActionResult.Success;
}
[CustomAction]  //Note added attribute.
  public static ActionResult CustomActionB(Session session)
{
session.Log("Begin CustomAction B");

return ActionResult.Success;
}
}


Thanks

Oscar


-Original Message-
From: skaa [mailto:sk...@hotmail.com] 
Sent: Thursday, September 17, 2009 8:00 AM
To: wix-users@lists.sourceforge.net
Subject: [WiX-users] C#, two custom actions from one DLL


This is the piece of WXS file:







  NOT
REMOVE
  NOT
REMOVE


This is the piece of the DLL file:

namespace CustomAction
{
public class CustomActions
{
[CustomAction]
public static ActionResult CustomActionA(Session session)
{
session.Log("Begin CustomAction A");

return ActionResult.Success;
}
public static ActionResult CustomActionB(Session session)
{
session.Log("Begin CustomAction B");

return ActionResult.Success;
}
}
}

When I run the MSI, CustomActionA works fine, but for CustomActionB I have
the error. There is a piece of my log file:

Action start 9:56:49: CostInitialize.
Action ended 9:56:49: CostInitialize. Return value 1.
Action start 9:56:49: CustomActionA.
SFXCA: Extracting custom action to temporary directory:
C:\WINDOWS\Installer\MSI6D71.tmp-\
SFXCA: Binding to CLR version v2.0.50727
Calling custom action CustomAction!CustomAction.CustomActions.CustomActionA
Begin CustomAction A
Action ended 9:56:50: CustomActionA. Return value 1.
Action start 9:56:50: CustomActionB.
Error 1723. There is a problem with this Windows Installer package. A DLL
required for this install to complete could not be run. Contact your support
personnel or package vendor.  Action CustomActionB, entry: CustomActionB,
library: C:\WINDOWS\Installer\MSI6D72.tmp 
MSI (s) (50:14) [09:56:51:954]: Product: expCSCustomAction -- Error 1723.
There is a problem with this Windows Installer package. A DLL required for
this install to complete could not be run. Contact your support personnel or
package vendor.  Action CustomActionB, entry: CustomActionB, library:
C:\WINDOWS\Installer\MSI6D72.tmp 

Action ended 9:56:51: CustomActionB. Return value 3.
Action ended 9:56:51: INSTALL. Return value 3.


-
!
-- 
View this message in context: 
http://n2.nabble.com/C-two-custom-actions-from-one-DLL-tp3663658p3663658.html
Sent from the wix-users mailing list archive at Nabble.com.



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


Re: [WiX-users] Custom action from a dialog

2009-09-01 Thread Oscar Newkerk
That was the problem.  I changed the value of Indirect to "no" and it works as 
expected.  

Thanks for all the help.


Oscar


-Original Message-
From: Richard [mailto:legal...@xmission.com] 
Sent: Tuesday, September 01, 2009 11:18 AM
To: wix-users@lists.sourceforge.net
Subject: Re: [WiX-users] Custom action from a dialog


In article <95aea6e05b3fec40ab4a1dda76a5fca82414c9f...@usmail.unifysquare.com>,
    Oscar Newkerk   writes:

> Property(C): PIDKEY = None
> Property(C): None = "the PID value I entered"

This is the hallmark of an indirect property: instead of containing
the value it contains the name of the property that contains the value.

Is your PIDKEY property configured as indirect in the control?
-- 
"The Direct3D Graphics Pipeline" -- DirectX 9 draft available for download
 <http://legalizeadulthood.wordpress.com/the-direct3d-graphics-pipeline/>

  Legalize Adulthood! <http://legalizeadulthood.wordpress.com>



--
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with 
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
___
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users


Re: [WiX-users] Custom action from a dialog

2009-09-01 Thread Oscar Newkerk
That's a code fragment from my custom action written in C#. It's the accessor 
to the property value with the Id PIDKEY.

Thanks

Oscar


-Original Message-
From: Wilson, Phil [mailto:phil.wil...@wonderware.com] 
Sent: Tuesday, September 01, 2009 10:31 AM
To: General discussion for Windows Installer XML toolset.
Subject: Re: [WiX-users] Custom action from a dialog

>> In the custom action code session["PIDKEY"] is null.   

Why the quotes around PIDKEY?  

Phil Wilson 

-Original Message-
From: Oscar Newkerk [mailto:osc...@unifysquare.com] 
Sent: Tuesday, September 01, 2009 8:54 AM
To: General discussion for Windows Installer XML toolset.
Subject: Re: [WiX-users] Custom action from a dialog

I finally figured out that the Log messages were just not going to show up and 
wrote a property to see some debug info.

Now I'm seeing something even weirder.  Wix version:  3.0.5419.0

I have a custom UI sequence that I based on the standard WixUI_InstallDir 
sequence.

In my product.wix I declare a couple of properties and reference the dialog 
sequence:







In the custom dialog to validate the PID I hook my custom action to the "Next" 
control.  The custom action 
uses the value of PIDKEY as the key and sets a property "VALIDATEKEY" to 
indicate the result.


1






In the custom action code session["PIDKEY"] is null.  However, session["None"] 
returns the value entered in the Key control.

I figured this out looking in the setup log file where I found this:

Property(C): PIDKEY = None
Property(C): None = "the PID value I entered"

Any idea what I'm doing wrong with the properties?

Thanks

Oscar

-Original Message-
From: Richard [mailto:legal...@xmission.com] 
Sent: Monday, August 31, 2009 3:57 PM
To: wix-users@lists.sourceforge.net
Subject: Re: [WiX-users] Custom action from a dialog


1) When you invoke a CA through a dialog control event, the messages
you attempt to write to the log don't end up in the log.  You can work
around this for debugging by using MessageBox or OutputDebugString to
write out logging information.

2) When you invoke a CA through a dialog control event, and the CA
sets properties, the dialog processing logic in the MSI runtime
doesn't realize you've changed properties and it doesn't re-evaluate
subsequent event conditions using the new property value.  You can
work around this by inserting a phony event that sets the property to
its value, i.e. Foo = [Foo].
-- 
"The Direct3D Graphics Pipeline" -- DirectX 9 draft available for download
 <http://legalizeadulthood.wordpress.com/the-direct3d-graphics-pipeline/>

  Legalize Adulthood! <http://legalizeadulthood.wordpress.com>



--
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with 
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
___
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users





--
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with 
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
___
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users


Re: [WiX-users] Custom action from a dialog

2009-09-01 Thread Oscar Newkerk
I finally figured out that the Log messages were just not going to show up and 
wrote a property to see some debug info.

Now I'm seeing something even weirder.  Wix version:  3.0.5419.0

I have a custom UI sequence that I based on the standard WixUI_InstallDir 
sequence.

In my product.wix I declare a couple of properties and reference the dialog 
sequence:







In the custom dialog to validate the PID I hook my custom action to the "Next" 
control.  The custom action 
uses the value of PIDKEY as the key and sets a property "VALIDATEKEY" to 
indicate the result.


1






In the custom action code session["PIDKEY"] is null.  However, session["None"] 
returns the value entered in the Key control.

I figured this out looking in the setup log file where I found this:

Property(C): PIDKEY = None
Property(C): None = "the PID value I entered"

Any idea what I'm doing wrong with the properties?

Thanks

Oscar

-Original Message-
From: Richard [mailto:legal...@xmission.com] 
Sent: Monday, August 31, 2009 3:57 PM
To: wix-users@lists.sourceforge.net
Subject: Re: [WiX-users] Custom action from a dialog


1) When you invoke a CA through a dialog control event, the messages
you attempt to write to the log don't end up in the log.  You can work
around this for debugging by using MessageBox or OutputDebugString to
write out logging information.

2) When you invoke a CA through a dialog control event, and the CA
sets properties, the dialog processing logic in the MSI runtime
doesn't realize you've changed properties and it doesn't re-evaluate
subsequent event conditions using the new property value.  You can
work around this by inserting a phony event that sets the property to
its value, i.e. Foo = [Foo].
-- 
"The Direct3D Graphics Pipeline" -- DirectX 9 draft available for download
 

  Legalize Adulthood! 



--
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with 
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
___
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users


[WiX-users] Custom action from a dialog

2009-08-31 Thread Oscar Newkerk
I'm trying to use a custom action in a dialog to validate a PID entered by the 
user.  The dialog has a maskededit control that is used to get the string.  I 
have the following sequence defined on the "Next" button to use to validate the 
entered data:





  1
  VALIDATEKEY = 
"1"
  


I looked in Orca at the generated MSI and this is what I have in the 
ControlEvents table:

ValidatePIDDlg  Cancel  SpawnDialog CancelDlg   
1   1
ValidatePIDDlg  BackNewDialog   LicenseAgreementDlg 
1
ValidatePIDDlg  NextDoActionValidatePIDAction   
1   1
ValidatePIDDlg  NextSpawnDialog BadPIDCancelDlg VALIDATEKEY <> "1"  
3
ValidatePIDDlg  NextNewDialog   InstallDirDlg   
1
ValidatePIDDlg  NextNewDialog   InstallDirDlg   VALIDATEKEY = "1"   
2


The Custom Action is there as well:

ValidatePIDAction   1   ValidatePIDCA   ValidatePID

When I run the install, I see the ValidatePIDDlg displayed and when I enter a 
value for the PID,
I see the BadPIDCancelDlg displayed.

Looking at the setup log, I don't see my custom action getting called.  I have 
the CA send messages to the Session log and I don't see them:

Action 14:59:31: ValidatePIDAction.
Action start 14:59:31: ValidatePIDAction.
Action ended 14:59:32: ValidatePIDAction. Return value 1.
Action 14:59:32: BadPIDCancelDlg. Dialog created
Action 14:59:36: CancelDlg. Dialog created
Action ended 14:59:38: WelcomeDlg. Return value 2.
Action 14:59:38: UserExit.
Action start 14:59:38: UserExit.
Action 14:59:38: UserExit. Dialog created
Action ended 14:59:39: UserExit. Return value 2.
Action ended 14:59:39: INSTALL. Return value 2.


Thanks

Oscar



--
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with 
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
___
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users


Re: [WiX-users] Custom Actions

2009-08-14 Thread Oscar Newkerk
That was the error.  I was including the wrong DLL.

However the 

Thanks

Oscar


-Original Message-
From: Blair [mailto:os...@live.com] 
Sent: Friday, August 14, 2009 3:21 PM
To: 'General discussion for Windows Installer XML toolset.'
Subject: Re: [WiX-users] Custom Actions

Your entry point wasn't exported in the DLL you packaged:
http://blogs.msdn.com/heaths/archive/2006/08/14/determine-if-the-custom-acti
on-function-is-exported.aspx

Turns out with DTF projects that you can't reference the right DLL to use
using the 

This should work.

-Original Message-
From: Oscar Newkerk [mailto:osc...@unifysquare.com] 
Sent: Friday, August 14, 2009 2:15 PM
To: wix-users@lists.sourceforge.net
Subject: [WiX-users] Custom Actions


I'm trying to use a custom action in my setup and getting an error when the
MSI runs.  The custom action is a DLL written in C# using the Visual Studio
template for custom actions.  It's not executing correctly when I run the
setup.  Any suggestions as to what I'm doing wrong?

The entry point looks like:

[CustomAction]
public static ActionResult CustomAction1(Session session)
{
_session = session;

_session.Log("Begin RegisterScriptCA");
bool status = RegisterSIPApplication();
if (status)
{
return ActionResult.Success;
}
else
{
return ActionResult.Failure;
}
}


The custom action is defined as:








And included in the product.wxs file as:


  




The Wix package builds OK, but when I run the install, I get an error when
it tries to invoke the custom action:

Action 14:05:01: RegisterScript.
Action start 14:05:01: RegisterScript.
Error 1723. There is a problem with this Windows Installer package. A DLL
required for this install to complete could not be run. Contact your support
personnel or package vendor.  Action RegisterScript, entry: CustomAction1,
library: C:\WINDOWS\Installer\MSIB7.tmp
MSI (s) (5C:EC) [14:05:06:332]: Product:   -- Error 1723. There is a problem
with this Windows Installer package. A DLL required for this install to
complete could not be run. Contact your support personnel or package vendor.
Action RegisterScript, entry: CustomAction1, library:
C:\WINDOWS\Installer\MSIB7.tmp

Action ended 14:05:06: RegisterScript. Return value 3.
Action ended 14:05:06: INSTALL. Return value 3.

Thanks

Oscar




--
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus
on 
what you do best, core application coding. Discover what's new with 
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
___
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users




--
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with 
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
___
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users


[WiX-users] Custom Actions

2009-08-14 Thread Oscar Newkerk

I'm trying to use a custom action in my setup and getting an error when the MSI 
runs.  The custom action is a DLL written in C# using the Visual Studio 
template for custom actions.  It's not executing correctly when I run the 
setup.  Any suggestions as to what I'm doing wrong?

The entry point looks like:

[CustomAction]
public static ActionResult CustomAction1(Session session)
{
_session = session;

_session.Log("Begin RegisterScriptCA");
bool status = RegisterSIPApplication();
if (status)
{
return ActionResult.Success;
}
else
{
return ActionResult.Failure;
}
}


The custom action is defined as:








And included in the product.wxs file as:


  




The Wix package builds OK, but when I run the install, I get an error when it 
tries to invoke the custom action:

Action 14:05:01: RegisterScript.
Action start 14:05:01: RegisterScript.
Error 1723. There is a problem with this Windows Installer package. A DLL 
required for this install to complete could not be run. Contact your support 
personnel or package vendor.  Action RegisterScript, entry: CustomAction1, 
library: C:\WINDOWS\Installer\MSIB7.tmp
MSI (s) (5C:EC) [14:05:06:332]: Product:   -- Error 1723. There is a problem 
with this Windows Installer package. A DLL required for this install to 
complete could not be run. Contact your support personnel or package vendor.  
Action RegisterScript, entry: CustomAction1, library: 
C:\WINDOWS\Installer\MSIB7.tmp

Action ended 14:05:06: RegisterScript. Return value 3.
Action ended 14:05:06: INSTALL. Return value 3.

Thanks

Oscar



--
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with 
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
___
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users