Quantcast
Channel: Internet Explorer Web Development forum
Viewing all articles
Browse latest Browse all 3527

IE 11 32 bit Process ID gets changed. Bug or Intentional ?

$
0
0

I wrote a piece of code to launch IE11 and refocus the same window using process id.

I use JS fiddle

I run the below code by copying it to JavaScript section.

var URL = "GIVE ANY url YOU WANT INSIDE THIS QUOTES";

var wshShell = new ActiveXObject("WScript.Shell");

var IEVersion = "C:\\Program Files (x86)\\Internet Explorer\\IExplore.exe "+URL; //32bit

var LaunchApp = wshShell.Exec(IEVersion);
var AppProcessId = LaunchApp.ProcessID;
alert(AppProcessId );
//wshShell.AppActivate(AppProcessId);

You might need to Enable,Initialize and script activex controls not marked as safe for scriptingsecurity setting of IE in order to run ActiveX.

When I run this, I see an alert message with Process ID, but I don't see the same process Id in task manager. The browser is assigned with different process Id. This happens only withC:\\Program Files (x86)\\Internet Explorer\\IExplore.exe browser and NOT when I runC:\\Program Files\\Internet Explorer\\IExplore.exe browser.

Is this intentional ? If so Y ?


Viewing all articles
Browse latest Browse all 3527

Trending Articles