Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I have a POS application that will allow a call to another application. I have a need to have an Internet Explorer window open and switch to it. The command that I am using opens a new Internet Explorer window when run:

C:\Program Files\Internet Explorer\iexplore.exe

Is there any way to get the command to open the existing open window?

share|improve this question
    
I don't think this can be done via command-line, but it can be set globally in Internet Options. (i.e.: Open all links from external applications in the current window.) –  Iszi May 25 '11 at 18:34
add comment

1 Answer

If familiar with code, you could use the user32.dll method "SetForegroundWindow": http://www.pinvoke.net/default.aspx/user32.SetForegroundWindow

You could then just switch window to the new one when it opens? There's an example of pInvoking from managed code on the MS site. Just switch the code for the specifics. http://code.msdn.microsoft.com/CSPInvokeDll-23a75c51

The supported CLI switches for Internet explorer can be found here (doesn't look like there's one that helps you): http://msdn.microsoft.com/en-us/library/ee330728(v=vs.85).aspx

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.