Hi Everyone,
I've a specific requirement of checking whether a particular port is occupied
by a web application through Wix 3.0. I've written a custom action dll in C#
for this purpose and it returns ActionResult.Success and ActionResult.Failure
depending on Port Occupied or Not.
When ActionResult.Failure is returned, (that means "Port Is Already Occupied by
a web application"), then things are messed up and installer gets broken every
time.
Here is the log for the same :
Action ended 9:49:18: PortAvailabilityCheck. Return value 3.
DEBUG: Error 2896: Executing action PortAvailabilityCheck failed.
The installer has encountered an unexpected error installing this package. This
may indicate a problem with this package. The error code is 2896. The arguments
are: PortAvailabilityCheck, ,
I just wanted to know a possible way to return the status of a Port (maybe a
flag="0" or "1") from a custom action to Wix Dialog.
My first thought on this is there might be some Gotcha when Wix tries to
communicate with C# custom action dll. I don't have any idea about what a C++
custom action dll will do in this particular case. (Writing a C++ dll for this
task will be more cumbersome).
Is it possible to achieve the same using other ActionResult Enumeration
Parameters ? OR any other way for the C# dll to communicate the Port Status to
custom dialog (which will be useful to pop up the warning Dialog for Port
Already occupied) ?
****************************************************************************************************************************************************************************************************
public enum ActionResult
{
// Summary:
// Action completed successfully.
Success = 0,
//
// Summary:
// Skip remaining actions, not an error.
SkipRemainingActions = 259,
//
// Summary:
// User terminated prematurely.
UserExit = 1602,
//
// Summary:
// Unrecoverable error or unhandled exception occurred.
Failure = 1603,
//
// Summary:
// Action not executed.
NotExecuted = 1626,
}
****************************************************************************************************************************************************************************************************
Code snippet :
<Publish Event="DoAction" Value="PortAvailabilityCheck">1</Publish>
<Publish Property="WebAppExists" Value="[IdentifierValid]">1</Publish>
<Publish Event="SpawnDialog"
Value="PortNotAvailableDlg">WebAppExists=5</Publish>
I'm getting different values for these enumeration parameters when returned to
custom dialog. For Example, For Success its "1", for SkipRemainingActions its
"5",etc. So, my problem is to compare these return values appropriately to
proceed further.
This is weird, but this comparison always fails to get the expected behavior.
Please let me know if I'm doing anything wrong here ?
Any help on this will be much appreciated.
Thanks,
Vishwajit
________________________________
READER BEWARE: Unencrypted, unsigned Internet e-mail is inherently insecure.
Internet messages may be corrupted, incomplete, misdirected or may
incorrectly identify the sender. Therefore, nothing in this message or
attachments may be considered legally binding.
THIS MESSAGE IS ONLY INTENDED FOR THE USE OF THE INDIVIDUAL
OR ENTITY TO WHICH IT IS ADDRESSED AND MAY BE PRIVILEGED.
If you are not the intended recipient or their authorized agent, you
may not forward or copy this information and must delete or destroy all
copies of this message and attachments received.
If you have received this communication in error, please notify
Matrikon Inc. by telephone at (780) 448-1010 or emailing [email protected].
------------------------------------------------------------------------------
Download Intel® Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
_______________________________________________
WiX-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/wix-users