Как настроить определенный браузер (Internet Explorer) по умолчанию только для определенного приложения

3818
alonisser

У нас есть корпоративное программное обеспечение, которое правильно отображает отчеты только в IE, но я не хочу устанавливать IE в качестве браузера по умолчанию.

Приложение представляет собой настольное приложение на основе WPF / Silverlight, а не веб-приложение, но отчеты создаются в браузере в формате HTML. Я нашел этот ответ, но не понял, как именно работают скрипты reg и как мне его настроить.

  • Наше бухгалтерское программное обеспечение генерирует отчет в формате HTML. Я не могу контролировать тип документа, шаблон HTML или что-то еще.
  • Сгенерированный документ (отчет) открывается в браузере по локальному URL:

    file:///D:/Users/ALONIS~1/AppData/Local/Temp/p0430400234.htm

4
Пожалуйста, добавьте пример отчета и формат его URL. amiregelz 11 лет назад 0
[Что вы действительно пытаетесь сделать?] (Http://meta.stackexchange.com/q/66377/171857) kinokijuf 11 лет назад 1

2 ответа на вопрос

4
amiregelz

The best way to achieve your goal, is by using the IE Tab extension for your default browser (Firefox / Chrome).

Instead of trying to set a default browser for a specific application on the Windows side - which is way more complicated, do it on the browser side.

What Is IE Tab?

IE Tab for Chrome (and IE Tab 2 for Firefox) is a browser extension that allows you to use Internet Explorer to display web pages in a tab. This is useful in many cases where a web page requires Internet Explorer features.

Features

Auto URLs - Allows you to specify which URLs should always be loaded with IE Tab.

As you can see, the reason IE Tab is very useful in your case, is because it has the Auto URLs feature.

Instead of settings a specific browser for a specific application, you can simply tell IE Tab to be activated whenever you launch a certain URL.

And even better - it supports Regular Expressions, so whether your report is created as an html file offline (locally) or online, it will be very easy to tell IE Tab to always open your reports - which lets you view them in an IE environment - inside your default browser.

For example, if you reports are online, you can add http://www.myonlinereports.com/* to the Auto URLs to automatically open in IE Tab every page of the www.myonlinereports.com website.

If you reports are offline, you can add something like r/file:///D:/My%20Documents/My%20Reports/.* (don't forget the r/ prefix) to the Auto URLs to automatically open in IE Tab every file inside the My Reports folder.

enter image description here

также не точное решение моей проблемы, это дает какое-то терпимое решение, спасибо alonisser 11 лет назад 0
-1
Yatharth Agarwal

Can you give a sample of the report? What exactly doesn't work in other browsers?

On the SE network, it's often better to give the reader an idea of the big picture and what you're trying to do. My say is that it shouldn't have any major problems in today's age of standard-compliant browsers (even IE9! Can you believe that?)

If you do have problems, you can try changing the DOCTYPE to maybe something very old which will cause browsers to enter into quirks mode (equivalent of IE's Compatibility Mode).