I'm trying to run Internet Explorer from a batch file/scheduled task.

My batch file contains (in its entirety):

cd "%ProgramFiles%\Internet Explore"
iexplore.exe http://superuser.com -nohome

When I run the batch file the URL picks up the command line argument, rather than acting on it.


I'm sure I'm doing something silly, but don't see what at the moment. What is the solution?

This is on Windows 7 Home Premium, with Internet Explorer 8.

UPDATE in response to comments:

I got the nohome from some site or other, possibly the one mentioned in the comments. The previous attempt was actually using nohangrecovery which is documented Internet Explorer Command-Line Options.

My original attempt looked like this (which is actually as per the MSDN documentation:

cd "%ProgramFiles%\Internet Explore"
iexplore.exe -nohangrecovery http://superuser.com

This results in the address bar containing:


Sorry if this is a duplicate - I couldn't see any matches when I searched.

  • 1
    Is it possible that \Internet Explore is a typo? Isn't it Internet Explorer? – n0pe Jul 4 '11 at 13:18
  • That's a good point - well spotted. Its workng anyway, probably cos the bat file is in the Internet Explorer folder and I'm just clicking on it at the moment. – Jon Egerton Jul 4 '11 at 13:22
  • 1
    It might be because iexplore.exe is in the PATH which means that even if you're 'cd' ing to another directory, Windows is still finding the exe in the PATH. – n0pe Jul 4 '11 at 13:42
  • @AndrewTruckle: Taa updated. – Jon Egerton Apr 29 '19 at 14:54

Please refer to the documentation for Internet Explorer command-line options. Command-line options should go before the URL, and -nohome is not even a supported option. Where did you learn about -nohome?

  • Nohome is mentioned on this page referencing command line arguments. tek-tips.com/viewthread.cfm?qid=73898 It seems very outdated and this switch is possibly no longer supported as it is not referenced in newer material – Joe Taylor Jul 4 '11 at 11:56
  • It's all right with William's solution! Since "iexplore" is a "known command" for Windows, you can start it everywhere using use "start iexplore -nohome bol.com.br" (1 command line) instead of entering Internet Explorer folder and then executing that (2 command lines). – kokbira Jul 4 '11 at 11:56
  • Fair comment about nohome. I had already tried other args and ordering. What I pasted into the question was based on other searches on google. See my update for more. – Jon Egerton Jul 4 '11 at 12:55
  • Curses - just noticed that the option I'm trying to use is IE9, not IE8. Guess that makes your re-pointer to the docu the answer!!! – Jon Egerton Jul 4 '11 at 13:10

Just use this command:

"%ProgramFiles%\Internet Explorer\iexplorer.exe" http://superuser.com

No need for the cd\

  • Original: "%ProgramFiles%\Internet Explorer\iexploreR.exe" superuser.com (with extra "r" near the end of "iexplorer.exe" capitalized to show difference) Fixed: Remove the "r" typo and you get: "%ProgramFiles%\Internet Explorer\iexplore.exe" superuser.com Which can be copied and pasted and will work. – Developer63 May 23 '19 at 18:20

If you're just trying to open up Super User every time you log in via a batch file then simply put in:

cd "%ProgramFiles%\Internet Explore"
iexplore.exe http://superuser.com

However, if you're doing this to log in for 100 days consecutively then this won't work. I won't tell you why, but it won't :-)

  • lol - no I'm not. I'm mostly on StackOVerflow and I just lost a run of 29 consec days there by not paying attention on Sunday!!! The URL in the example is subbed in for the real one that I'm using. – Jon Egerton Jul 4 '11 at 12:54
  • 1
    Ah ok, I lost a 94 day run by having a hungover Sunday, was gutted. If you just remove the -nohome parameter it should work fine. I've tested it here and its working ok. – Joe Taylor Jul 4 '11 at 14:13

Instead of cd and going to the directory you could just do:

start "" iexplore http://superuser.com  

or just:

start iexplore http://superuser.com  

-nohome should be put before the url. I'm not sure if the command exists.


Add the -noframemerging switch at the end of the Internet Explorer shortcut and you will have separate sessions. This works in Windows 10 using Internet Explorer 11.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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