Lucien Bulles
Lucien Bulles

Reputation: 99

Modify the default web browser for all child processes

On Windows, is there any way to modify the default browser in current application domain, but not system wide?

I'm developing an IDE using C# and I need that all child processes that try to launch the default web browser, see my IDE as the default web browser. But I need to do so in a way that it does not affect the rest of the system configuration.

Not sure if I'm explaining the issue clearly...

Anyone has any ideas how this could be done?

Upvotes: 0

Views: 104

Answers (2)

mikalai
mikalai

Reputation: 1736

Actually there is no way to make it for a certain process. This value is stored in registry, and can be changed for a different user.

But in general are several options.

  1. Run debuggee using a special user account, which has a different registry value for default browser.

  2. Register your IDE as default browser in a reg key HKEY_CLASSES_ROOT\http\shell\open\command. If IDE could determine if the caller is not a debuggee, invoke original browser (don't forget to backup initial value).

  3. If you use something like host process - intercept calls to RegQueryValue or other registry functions, and hijack the result for a debuggee. (if there is no host process, try to inject an interceptor). Alternatively you may intercept CreateProcess or ShellExecute.

  4. I'm afraid that's not an option, but - you're able to register a dummy protocol (like myhttp://) and pretend it's http :) Your IDE will be a handler for it.

Upvotes: 2

Paul Sinnema
Paul Sinnema

Reputation: 71

On which Windows are you? In windows 7 and 8 you can find the default program settings in the control panel. Just start the control panel and type 'default programs' in search box in the upper right hand corner.

Upvotes: 0

Related Questions