Hi, I need to check whether the installation path contains characters other
than, a-z, A-Z, 0-9, -, _ and space.
What I did was this,
1. Removed the standard BrowseDlg and added a new browse dialog.
(MyBrowseDlg)
<Dialog Id="MyBrowseDlg" Width="370" Height="270"
Title="!(loc.BrowseDlg_Title)">
<Control Id="PathEdit" Type="PathEdit" X="25" Y="202"
Width="320" Height="18" Property="_BrowseProperty" Indirect="yes" />
<Control Id="OK" Type="PushButton" X="240" Y="243" Width="56"
Height="17" Default="yes" Text="!(loc.WixUIOK)">
<Publish Event="DoAction" Value="MyCustomAction">1</Publish>
<Publish Event="EndDialog" Value="Return">1</Publish>
</Control>
.
.
.
2. Created a managed custom action to perform the verification.
<Binary Id="MyCustomAction.dll"
SourceFile="$(var.CustomAction1.TargetDir)$(var.CustomAction1.TargetName).CA.dll"
/>
<CustomAction Id="MyCustomAction" BinaryKey="MyCustomAction.dll"
DllEntry="CustomAction1" Execute="immediate" />
I have a couple of problems doing this.
- Passing the install directory as an input to the custom action.
I tried to use 'session.Log(session["INSTALLDIR"])'. But it doesn't seem to
have the value.
Showing an error message, if verification fails.
- I tried this,
session.Message(
InstallMessage.Error |
(InstallMessage)(MessageBoxIcon.Error) |
(InstallMessage)MessageBoxButtons.RetryCancel,
record);
This prints an entry to the log. But I don't get any message popping up.
Please advice how can I resolve these problems. Is there an easier way of
achiving this task?
Thanks,
Sandun
------------------------------------------------------------------------------
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
[email protected]
https://lists.sourceforge.net/lists/listinfo/wix-users