We are using VBScript code to open the application window to avoid users having forward/back navigation while opening the IE8 window.
This is the code used.
Set WshShell = CreateObject("shell.application")
Set IE=CreateObject("InternetExplorer.Application")
IE.menubar = 1
IE.toolbar = 0
IE.statusbar = 0
'here we open the application url
IE.navigate "http://www.google.com"
IE.visible = 1
WshShell.AppActivate(IE)
This is working fine, however the problem is that if the user opens multiple windows the session cookies are shared accross the windows.
For this also there is a solution that we can use the nomerge option while opening the IE
WshShell.ShellExecute "iexplore.exe", " -nomerge http://www.google.com", null, null, 1
Now we want both these options to be available. i.e user should not be able to navigate forward/backward and also if two windows are opened data should not be shared.
We were not able to get both these things working together.
Also we do not want any full screen mode(i.e after pressing F11)
Can any one provide the solution?
Thanks in advance.
See the answers for this very closely related question: Launch Internet Explorer 7 in a new process without toolbars. There are a couple of workable options, one using Powershell, and one using some cludgy VBScript.
From what I understand, cookies are set by instance. Multiple browser windows are still going to be the same instance.
You might be able to pass in a sort of ID parameter that the program tracks, but the browser doesn't. That way regardless of how the program runs, it will have its own 'session' ID.
I think you can do this with javascript, and reading it using a asp.net hidden field. This might give you the uniqueness you're looking for.
The solution mentioned in the link answered by patmortech is not perfect, as the cookies were still shared. So used the -nomerge option in the AppToRun variable which creates two processes when user opens the application twice in the single machine.
In IE8 if two internet explorers are opened then they are merged into single process so the -nomerge option which opens the IE8 instances in difference processes.