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?

link|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 Rory or Isznti May 25 '11 at 18:34
feedback

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

link|improve this answer
feedback

Your Answer

 
or
required, but never shown

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