-2

I am trying to run iexplore.exe invisibly. This works but it shows the internet explorer window.

@Start iexplore www.google.com

Than I tried it with /d

@Start /d iexplore www.google.com

But I'm getting "The current directory is invalid" error. What is the correct way to run iexplore via bat file invisibly ?

user198989
  • 4,574
  • 19
  • 66
  • 95

1 Answers1

1
Set WshShell = WScript.CreateObject("WScript.Shell")
WshShell.Run """c:\program files\internet explorer\iexplore"" www.google.com", 0, false

Put in a file called HiddenGoogle.vbs

0 means hidden - there is about 12 options

false means don't wait. True means wait.

Typing this in a command prompt will allow you to check on your hidden window. You can tell which one it is by the window title.

tasklist /v /fi "imagename eq iexplore.exe"

or

tasklist /v /fi "imagename eq iexplore.exe" /fi "windowtitle eq Google - Windows Internet Explorer"

Just type the name of the vbs file to run it. Either in command prompt or in a batch file.

"c:\some folder\hiddengoogle.vbs"

That's all.