Why does Explorer.exe crash when I launch it with a VBScript?

Jørgen Malmgren April 3, 2012
Pinterest Stumbleupon Whatsapp

If I save the following 5 lines as, for example, “Explorer.vbs” and double-click on the file (associated to vscript.exe or cscript.exe) a new Explorer.exe is opened, and automatically shows “C:\Users” –

Dim oShell : Set oShell = wScript.CreateObject("wScript.Shell")
Dim bStatus

bStatus = oShell.Run("C:\Windows\explorer.exe C:\Users")
wScript.Quit

I could choose something other than C:\Users, e.g. \\ComputerName\C$\Users

But after a few minutes I get this error message:

“Windows explorer stopped working. You can search the internet for a solution.”

I don’t get any help from searching the Internet for a solution. My only option is to close the program (being the new Explorer.exe, not my vbs script, because it terminates automatically because of line 5 above).

I don’t have this issue when starting C:\Windows\Explorer.exe from my Start Menu, so why does it happen with my script?

Sincerely
Jorgen Malmgren
IT-Programmer
www.tryware.dk

Ads by Google

  1. FIDELIS
    April 3, 2012 at 11:28 pm

    Hello, I also copy/paste your vbs script and ran it in my system.  It ran with no problems until I exit it.

  2. Bruce Epper
    April 3, 2012 at 9:06 pm

    It has to be something with your specific configuration since it ran for over an hour before I closed it without receiving any error messages whatsoever.  So, what kind of debuggers do you have chained into the system?

  3. ha14
    April 3, 2012 at 11:40 am

    maybe this can help debug
    http://www.sevenforums.com/general-discussion/26297-explorer-crashing-when-deleting-files-2.html

    perhaps also Disable DEP or NoExecute Protection to fix Explorer Crashing