Unable to Open Hard or USB Flash Drive with Windows Script Host Cannot Find Script File autorun.vbs Error
In some situation especially when anti-virus program has cleaned, healed, disinfected or removed a worm, trojan horse or virus from computer, there may be error happening whenever users try to open or access the drive by double clicking on the disk drive icon in Explorer or My Computer window to try to enter the drive’s folder. The problem or symptom happens in hard disk drive, portable hard disk drive or USB flash drive, and Windows will prompt a dialog box with the following message:
Windows Script Host
Can not find script file autorun.vbs.
Sometimes you will be asked to debug the VBScript with error code of 800A041F – Unexpected ‘Next’.
or
Choose the program you want to use to open this file with:
In this case, the “Always use the selected program to open this kind of file” option is grayed out.
The symptom occurs because when autorun.vbs is created by trojan horse or virus. The virus normally loads autorun.inf file to root folder of all hard drive or USB drive, and then execute autorun.bat file which contains script to apply and merge autorun.reg into the registry, with possible change to the following registry key to ensure that virus is loaded when system starts:
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon]
Userinit=userinit.exe,autorun.exe
Finally, autorun.bat will call wscript.exe to run autorun.vbs.
When antivirus or security software detected the autorun.vbs file as infected, the file will be deleted or removed or quarantined. However, other files (autorun.*) and registry value still referring to autorun.vbs, and this document no longer exists, hence the error when users double click to open a drive folder.
To correct and solve this error, follow this steps:
- Run Task Manager (Ctrl-Alt-Del or right click on Taskbar)
- Stop wscript.exe process if available by highlighting the process name and clicking End Process.
- Then terminate explorer.exe process.
- In Task Manager, click on File -> New Task (Run…).
- Type “cmd” (without quotes) into the Open text box and click OK.
- Type the following command one by one followed by hitting Enter key:
del c:\autorun.* /f /s /q /a
del d:\autorun.* /f /s /q /a
del e:\autorun.* /f /s /q /ac, d, e each represents drive letters on Windows system. If there are more drives or partitions available, continue to command by altering to other drive letter. Note that you must also clean the autorun files from USB flash drive or portable hard disk as the external drive may also be infected.
- In Task Manager, click on File -> New Task (Run…).
- Type “regedit” (without quotes) into the Open text box and click OK.
- Navigate to the following registry key:
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon
- Check if the value name and value data for the key is correct (the value data of userint.exe include the path which may be different than C drive, which is also valid, note also the comma which is also needed):
“Userinit”=”C:\WINDOWS\system32\userinit.exe,”
If the value is incorrent, modify it to the valid value data.
Related Articles
- Host Process for Windows Services Has Stopped Working Error – Workaround Fix
- AutoPlay/AutoRun Not Working or Missing Not Open in Windows Vista
- Block Malicious Autorun Files with Autorun Eater
- Open File Location Menu Item Is Missing or Not Showing When Right Click on Shortcut in Windows Vista
- Workaround to Fix Windows 7 Unable To Create or Save New Files in the Folder Error When Unloading Box
- Unable to Login to Windows Live (MSN) Messenger with 80048820 Extended 80048416 Error Code
- Cannot Display the Webpage and Host/Server Not Found or Available Error – EnablePMTUDiscovery MTU Fix
- Microsoft Money 2007 Unable to Connect to Internet to Sign In Online in Windows Vista Error
- Unable to Install and Upgrade PPStream on PowerPlay.dll and PowerList.ocx Error
- Fix Explorer.exe Unable to Locate Component Because Browseui.dll Was Not Found Error










































September 5th, 2007 14:20
Excellent!
Thanks. Worked great
August 27th, 2007 13:08
[...] i got stuck with Wscipt.exe i did google i find it was Unable to Open Hard or USB Flash Drive with Windows Script Host Cannot Find Script File autorun.vbs … i did what it said but now when i done i get thi error when i open drive on hdd or pen drive i am [...]
August 25th, 2007 08:12
Thanks man.. it GREEEAAATEEEEE
August 22nd, 2007 18:12
Thanks man
It working very well.
Y’re a great man.
God bless you
August 19th, 2007 21:51
Tbankssssssssssss you jst saved a computer
August 18th, 2007 01:17
thanks man it really works
August 14th, 2007 17:34
thankx man God bless u .but u forget to tell one thing that after the whole great process one must restart his computer.and all done………
August 14th, 2007 17:31
hey man i dont know how to thank u .i tried every software but couldnt get myself out of this problem.God bless u man.may u live long.onece again thank u thank u very much……………
August 14th, 2007 17:02
hey i have followed all the but still can not find the way out.i can not open my drives with some fucking chinese words
August 3rd, 2007 20:07
hi, this solves my problem…Thanx papu..
August 3rd, 2007 19:42
Weldone. Thank you very much
July 22nd, 2007 20:10
thks for u informatiom. I gone through the simple steps as per ur instructions and my system works fine. thks again…
July 19th, 2007 20:07
Thanks man..
July 16th, 2007 20:49
thanks dude!!!
ur instructions are amazing…
my system is working is fine.
nyways this article is fucking amazing
and I hope it’s very clear to everybody…
Thanks & regards,
Arjun Reddy G.
July 15th, 2007 16:36
it,s really cool . well guy,……
July 13th, 2007 01:35
Hey i’ve gone through the steps described in the help and still no solution. The autorun files keep reappearing when i reboot. Also in my case i have another file aswell which is a .exe file and the name keeps on changing to a random 9 letter prefix. This program launches when i double click on a hard disk and the uses 100% of my cpu until i end the process. Ive tried insalling that script defender and even changed some of the permissions on the drives. Nothings working. I cant do a clean install either because it is on all the drives and this is my Digital Audio Workstation with 100gb+ of data on it so a backup isn’t viable.
One final thing the virus was transmitted by my pen drive and not through the internet.
Any help is much appreciated
Yours
Dave Major
July 11th, 2007 00:06
thanx a lot brotha !!!
July 11th, 2007 00:05
thanx a lot bro………u r da man !!!
July 9th, 2007 20:46
Hey it worked perfectly fine with me. Thank You very much.
July 9th, 2007 03:18
Thanks a ton for this valuable information..
It was very frustrating when the drives wont open on a double-click. Your solution helped.
Thank you once again
July 7th, 2007 19:35
Thank you so much, it really help me…
July 4th, 2007 09:34
Thanks, this article helped me solve this problem,
but it took me some time googling to find this article, so I decided to write some tags to help other googlers find their way to this page.
“remove auto from drive context menu”
“edit drive context menu”
cannot open c: drive +auto +menu
June 29th, 2007 08:39
I tried this, works great. Fixed the my problem with my machine reading USB drives.
Was getting this problem on double click:
“Choose the program you want to use to open this file with:”
June 28th, 2007 20:08
My HKEY was “Userinit”=”C:\WINDOWS\system32\userinit.exe,”. Still have the same problem. None of my hard drives will open when doing a double click.
June 27th, 2007 17:13
also before i delete autorun files, when i put a removable disk a window appeared with the name” attrib.exe” and said” no hard drive found in hard Disk/DDR1/DDR2″ something like that. many times, that it started to get on my nerves. i presed cancel and then the same window appeared with deferent DDRs