function installFromPath(path, filenameHint) {
        var d = new $.Deferred();

        install(path, filenameHint)
            .done(function (result) {
                result.keepFile = true;

                var installationStatus = result.installationStatus;
                if (installationStatus === InstallationStatuses.ALREADY_INSTALLED ||
                        installationStatus === InstallationStatuses.NEEDS_UPDATE ||
                        installationStatus === InstallationStatuses.SAME_VERSION ||
                        installationStatus === InstallationStatuses.OLDER_VERSION) {
                    d.resolve(result);
                } else {
                    if (result.errors && result.errors.length > 0) {
                        // Validation errors - for now, only return the first one
                        d.reject(result.errors[0]);
                    } else if (result.disabledReason) {
                        // Extension valid but left disabled (wrong API version, extension name collision, etc.)
                        d.reject(result.disabledReason);
                    } else {
                        // Success! Extension is now running in Brackets
                        d.resolve(result);
                    }
                }
            })
            .fail(function (err) {
                d.reject(err);
            });

        return d.promise();
    }
On success, resolves with an extension metadata object; at that point, the extension has already
started running in Brackets. On failure (including validation errors), rejects with an error object.

An error object consists of either a string error code OR an array where the first entry is the error
code and the remaining entries are further info. The error code string is one of either
ExtensionsDomain.Errors or Package.Errors. Use formatError() to convert an error object to a friendly,
localized error message.

@param {string} path Absolute path to the package zip file
@param {?string} filenameHint Hint for the extension folder's name (used in favor of
         path's filename if present, and if no package metadata present).
@return {$.Promise} A promise that is rejected if there are errors during
         install or the extension is disabled.