How to Cancel an install when Search Methods don't find anything
How to Cancel an install when Search Methods don't find anything
- Subject: How to Cancel an install when Search Methods don't find anything
- From: Mark Krenek <email@hidden>
- Date: Sun, 25 Sep 2005 13:17:35 -0500
The short question: Is there any way to prevent an installation from continuing if one of the search methods (BundleIdentifierSearch, CommonAppSearch, etc.) fails to find an applicable target?I'm writing an installer that updates an existing installation of our application. The location of the existing application is not known, so some form of the search methods (BundleIdentifierSearch, CommonAppSearch, etc.) is used. What I want to do is not allow the installation to proceed if any of these searches fails to find a suitable candidate. The problem I am having is that if the searches fail, then the default location specified in the package is used. I don't want that to happen. If an existing installation can not be found, then the installation should fail.
I've tried using Installation Requirements (IFRequirementDicts) but I don't see that those allow you to specify a bundle identifier. You can only specify existing bundles via a path. But since I don't know where the user has installed our app, I can't specify a path. The documentation suggests you can use tokenized file paths, but my experience shows this not to be the case. The tokens have not been resolved at the point that the IFRequirementDicts is evaluated.
I've also looked into writing a preflight or preinstall script that tries to determine if the search failed. But I'm not certain if I can access my search token from within the script. That would be ideal.
|
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Installer-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden