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










































June 27th, 2007 17:09
i have the problem of the autorun.vbs. i cleaned all autoruns that my antivirus thought as a threat( virus detected) and after that i can’t get in my c:/ of any hard disk.Removables also. Can not find script file F:\autorun.vbs or c:\ … I used avast antivirus witch did’d find any threat. then i used nod32 and deleted all autorun files. then this problem. i did system restore. and now i used Kaspersky_6_1_.0.2.621 and the same thing that nod32 appeared. I can’t get anywere. only by the Windows explorer i can get throw my disks. What can i do ???? Please i need your help.
June 27th, 2007 05:03
Thank you! I used this solution to help one of my clients. Kudos.
June 24th, 2007 21:21
how can you get this?
June 17th, 2007 01:01
if you find “Autorun” command in your drive’s context menu (right click menu); then you are being affected by autorun virus.you can remove it by installing the program named “Script Defender”.it can be obtained from “http://www.analogx.com/contents/download/system/sdefend.htm”
June 11th, 2007 00:27
I edited the value data for the key according to the last line of instruction.
I typed:
“Userinit”=”C:\WINDOWS\system32\userinit.exe,”
including all the punctuation.
I was not sure if I should have typed the quotation marks or not, but because in the other cases I was told not to (and in this one no instruction), I typed them.
Now my computer automatically logs off whenever I logon. I can’t get past that.
Please help.
June 2nd, 2007 18:21
i’ve done it for c: partition. TY so much
just… i want to do that and for my H: partition (external drive) and i don’t know what to put (and where) to make it work.
“C:\WINDOWS\system32\userinit.exe,” – i used this for c: and it worked
“H:\WINDOWS\system32\userinit.exe,” – is this used for H: partition as well? cause i don’t have windows on my external drive (mainly storage) + do i have to put it under value date where is now “C:\WINDOWS\system32\userinit.exe,”
please answer
thnx
June 2nd, 2007 03:08
god bless u man …i am suffer for this prb for so many dayyyys….now i solved it with your suggetio…..u r simply g8888888888 est ….10000000 cheers for u..
June 1st, 2007 22:19
it doesn’t work for me
May 22nd, 2007 19:44
Thanks a lot. You really saved me a lot of headache.
Have had this problem for a long time and could not fix it until I followed your advice. Thanks again.
May 20th, 2007 18:48
Sir,There is aproblem in my system. When double click on Drives C,D,E,F, drive cannot opening. giving error windows script host cannot find “maskrider.dll.vbs”
Kindly give me the solution.
Thanks,
Ravi
May 18th, 2007 10:20
Bert, SOMETINES in Recovery Mode, if you have been asked for administrator’s password…just press enter. I had a booting problem and needed to go in Recovery console -Then stuck in the password. I just pressed enter (as recommended in forums) and VOILA. But I don’t know about the logging off problem.
Nice post, it helped two of my friends(!) when I came across it
May 17th, 2007 17:10
Bert, have you try Safe Mode?
May 17th, 2007 16:59
C’mon man…u blew it up..why the hell u played with that comma.
aahh…
May 17th, 2007 16:14
Hi,
it all seemed to work, but than i took out the comma as well and now when i logon, the macine logs off immediately.
Starting from cd with recovery console asks me for a administator’s password, but all the passwords i normally use do not give me access.
What else can i do?
bert
May 15th, 2007 18:16
Hey, it works!!! I had the problem for few months and after trying out your suggestion, it doesn’t bother me anymore! =)
May 15th, 2007 00:08
Thanx dude, this happened to every comp in my home and even my frends’ comp at the same time. You saved all of us…this is great.
Bad
Monash University
Malaysia
May 14th, 2007 22:13
Thank you for your help. It solved the problem I was experiencing.
May 11th, 2007 18:21
but when i delete that in usb and reinsert again, it dont open. virus still persists.. what to do now
May 10th, 2007 02:37
Dfinitely u made my day 2!
May 8th, 2007 05:21
Thanxxx man ,,u made my day
May 6th, 2007 19:14
hi thanks for help
im from kurdistan
May 5th, 2007 00:36
great post! thanks!
April 30th, 2007 03:52
thanks for ur way to clean d autorun.vbs trojan.it really works…thanks!!
April 19th, 2007 21:43
Hi kay, thanks for suggestion, will look into it soon.
April 19th, 2007 19:27
if only u had a print this article button, so it take u to anopther page and u can print the article without adverst uno, good stuff thanks