This website uses cookies. By clicking Accept, you consent to the use of cookies. Click Here to learn more about how we use cookies.
Turn on suggestions
Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.
- Revenera Community
- :
- InstallShield
- :
- InstallShield Forum
- :
- Re: Custom Action Error crashes installer
Subscribe
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Subscribe
- Mute
- Printer Friendly Page
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Jul 15, 2010
10:52 AM
Custom Action Error crashes installer
I am having some trouble with prompting the user with a simple custom action "Error" message.
I created the error and left everything with the default settings.
In my Dialog box I created a "DoAction" event and called the custom action when the user presses the "OK" button. I then put a condition on the error based on what path the user picks. If the user picks an invalid drive the error is displayed and it stays on the current dialog (the dialog that generate the error) if they pick a valid drive the error does not show up and the installer continues.
My condition is working because if the user pick a valid selection it doesn't error as it should. The problem is when the user selects an invalid option, the error message displays as expected but then I get a "MSIEXEC.exe application error" The instruction at "0x0013a008" referenced memory at "0x013a008". The memory could not be "written". Ok and cancel.
I tried changing the event order on the "OK" to have the DoAction before the return and I also tried it after the return but still have the same problem.
[CODE]
Event Arguement Condition
[FEATURENAME] [SELECT_DISK]Path
SetTargetPAth [_BrowseProperty]
DoAction InstallDriveError NOT (SELECTED_DISK="C:\") OR NOT (SELECTED_DISK="D:\")
EndDialog Return (SELECTED_DISK="C:\") OR (SELECTED_DISK="D:\")
[/CODE]
I created the error and left everything with the default settings.
In my Dialog box I created a "DoAction" event and called the custom action when the user presses the "OK" button. I then put a condition on the error based on what path the user picks. If the user picks an invalid drive the error is displayed and it stays on the current dialog (the dialog that generate the error) if they pick a valid drive the error does not show up and the installer continues.
My condition is working because if the user pick a valid selection it doesn't error as it should. The problem is when the user selects an invalid option, the error message displays as expected but then I get a "MSIEXEC.exe application error" The instruction at "0x0013a008" referenced memory at "0x013a008". The memory could not be "written". Ok and cancel.
I tried changing the event order on the "OK" to have the DoAction before the return and I also tried it after the return but still have the same problem.
[CODE]
Event Arguement Condition
[FEATURENAME] [SELECT_DISK]Path
SetTargetPAth [_BrowseProperty]
DoAction InstallDriveError NOT (SELECTED_DISK="C:\") OR NOT (SELECTED_DISK="D:\")
EndDialog Return (SELECTED_DISK="C:\") OR (SELECTED_DISK="D:\")
[/CODE]
(2) Replies
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Jul 15, 2010
11:27 AM
It looks like you were going for mutually exclusive conditions on the DoAction and EndDialog control events. However, your conditions are not mutually exclusive.
Incorrect:
NOT (SELECTED_DISK="C:\") OR NOT (SELECTED_DISK="D:\")
Correct:
NOT (SELECTED_DISK="C:\" OR SELECTED_DISK="D:\")
Also Correct:
SELECTED_DISK<>"C:\" AND SELECTED_DISK<>"D:\"
Perhaps changing the condition to be mutually exclusive will fix the problem?
Incorrect:
NOT (SELECTED_DISK="C:\") OR NOT (SELECTED_DISK="D:\")
Correct:
NOT (SELECTED_DISK="C:\" OR SELECTED_DISK="D:\")
Also Correct:
SELECTED_DISK<>"C:\" AND SELECTED_DISK<>"D:\"
Perhaps changing the condition to be mutually exclusive will fix the problem?
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Jul 15, 2010
12:59 PM
Ajay Ladsaria wrote:
It looks like you were going for mutually exclusive conditions on the DoAction and EndDialog control events. However, your conditions are not mutually exclusive.
Incorrect:
NOT (SELECTED_DISK="C:\") OR NOT (SELECTED_DISK="D:\")
Correct:
NOT (SELECTED_DISK="C:\" OR SELECTED_DISK="D:\")
Also Correct:
SELECTED_DISK<>"C:\" AND SELECTED_DISK<>"D:\"
Perhaps changing the condition to be mutually exclusive will fix the problem?
You are correct. But that did not resolve the problem.
Apparently the error dialog box is designed to close the installer, which is not what I wanted it to do.
What I ended up doing is making an InstallScript and using the "MessageBox" function to prompt the user.
function InvalidDriveMessage(hMSI)
begin
MessageBox ( 'Your selection was invalid. You must select drive C:\\ or D:\\' , INFORMATION );
end;
This worked as I expected.
![](/skins/images/8C9D13A71C7F7695F3262372C0172D68/responsive_peak/images/icon_anonymous_message.png)