Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6621629
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T21:17:29+00:00 2026-05-25T21:17:29+00:00

We are using VBScript code to open the application window to avoid users having

  • 0

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.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-25T21:17:29+00:00Added an answer on May 25, 2026 at 9:17 pm

    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.

     On Error Resume Next
    
    AppURL = "http://www.stackoverflow.com"
    AppToRun = "iexplore -nomerge"
    AboutBlankTitle = "Blank Page"
    LoadingMessage = "Loading stackoverflow..."
    ErrorMessage = "An error occurred while loading stackoverflow.  Please close the Internet Explorer with Blank Page and try again.  If the problem continues please contact IT."
    EmptyTitle = ""
    
    'Launch Internet Explorer in a separate process as a minimized window so we don't see the toolbars disappearing
    dim WshShell
    set WshShell = WScript.CreateObject("WScript.Shell")
    WshShell.Run AppToRun, 6
    
    dim objShell
    dim objShellWindows
    
    set objShell = CreateObject("Shell.Application")
    set objShellWindows = objShell.Windows
    
    dim ieStarted
    ieStarted = false
    
    dim ieError
    ieError = false
    
    dim seconds
    seconds = 0
    
    while (not ieStarted) and (not ieError) and (seconds < 30)
    
        if (not objShellWindows is nothing) then
            dim objIE
            dim IE
    
            'For each IE object
            for each objIE in objShellWindows
    
                if (not objIE is nothing) then
    
                    if isObject(objIE.Document) then
                        set IE = objIE.Document
    
                        'For each IE object that isn't an activex control
                        if VarType(IE) = 8 then
    
                            if IE.title = EmptyTitle then
                                if Err.Number = 0 then
                                    IE.Write LoadingMessage
    
                                    objIE.ToolBar = 0
                                    objIE.StatusBar = 1
                                    objIE.Navigate2 AppURL
    
                                    ieStarted = true
                                else
                                    'To see the full error comment out On Error Resume Next on line 1
                                    MsgBox ErrorMessage
                                    Err.Clear
    
                                    ieError = true
    
                                    Exit For
                                end if
                            end if
                        end if
                    end if
                end if
    
                set IE = nothing
                set objIE = nothing
            Next
        end if
    
        WScript.sleep 1000
        seconds = seconds + 1
    wend
    
    set objShellWindows = nothing
    set objShell = nothing
    
    'Activate the IE window and restore it
    success = WshShell.AppActivate(AboutBlankTitle)
    
    if success then 
        WshShell.sendkeys "% r"  'restore 
    end if
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am using vbscript .vbs in windows scheduler. Sample code: objWinHttp.Open POST, http://bla.com/blabla.asp, false
I'm using a VBScript to run an application on my Win Server 2003, and
I would like to create a shortcut on the desktop using VBScript code. I
I am trying to return a success/error code using Environment.Exit function in console application.
I am using the following VBScript code snippet to enumerate all files in my
I have working code that opens up a word document programmatically using vbscript, makes
I'm using a vbscript to programmatically run through a list of word documents, open
I'm using VBScript (ASP Classic) and SQL Server; I'm trying to have a section
i am using vbscript to call a batch file. my script looks like: dim
I need to launch programs in my local system using VBScript. But I am

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.