0

The Desktop class opens a URL in the user's default browser when using the open() method. How can a URL be opened in IE even when IE is not the default browser?

Edit: Solutions do not have to use the Desktop class. I was using that as an example.

4
  • you can't, you can only open it in the default browser. Commented Apr 28, 2011 at 15:28
  • @liv solutions don't have to use the Desktop class. I know you can open IE by calling exec() also, but it doesn't seem very elegant Commented Apr 28, 2011 at 15:30
  • why do you want to open it in another browser? Commented Apr 28, 2011 at 15:32
  • you're right -- it's not elegant and it's not portable since different windows version have IE installed in different locations. Commented Apr 28, 2011 at 15:37

1 Answer 1

1

Try invoking, in System.exec() iexplore.exe 'http://my.url', which is the name of Internet explorer executable.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.