I'm simply trying to get a "Search" to run and if it finds the files and they are of a certain version or prior then it pops up an "ErrorMessage" from the "Custom Actions" that says please manually uninstall this older version and ends the install.
(I gave up on trying to make AI do the uninstall of this 8 year old exe based install, I do not understand the instructions for custom actions or something, I read and reread them and still don’t get it or think I get it but it still doesn’t work like I thought it would. I would love some real world examples of custom actions. The current instructions tell you what each option is just fine but not how to actually put it all together in a real world example and make work.)
Anyways here is where I am at and what has happened:
1) I created a custom Search looking for 3 different exe's at a specific location. This appears to work fine.
2) I then went to Custom actions and I want this to run immediately when the install is started so I added a "Standard Action" of "Launch Conditions" in the "InsallUISequence". In the Expression of this I have: "((SR1) or (SR2) or (SR3))" which are the 3 files I wanted it to check and see if they are there. This also appears to test fine.
3) I then right clicked on "LaunchConditions" and selected "New Custom Action" > "ErrorMessage" because if the expression in the “Launch Conditions” was true I want it to pop up a message box and end the installation.
So when I run it and the file exists the run log looks like:
MSI (c) (1C:DC) [09:44:47:615]: Doing action: LaunchConditions
Action 9:44:47: LaunchConditions. Evaluating launch conditions
Action start 9:44:47: LaunchConditions.
Action ended 9:44:47: LaunchConditions. Return value 1.
MSI (c) (1C:DC) [09:44:47:646]: Doing action: ErrorMessage
When I run it and none of the files exist the run log looks like:
MSI (c) (94:44) [11:13:03:115]: Skipping action: LaunchConditions (condition is false)
MSI (c) (94:44) [11:13:03:130]: Doing action: ErrorMessage
So either way it pops up the error message and ends the program. I'm obviously not understanding something here because I thought it would only do the error message if the condition was true in the launch conditions since the "ErrorMessage" is in a sub section of the "LaunchCondition".
Thanks
FOLLOW US
Get the latest news in Application Packaging