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?