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:

  1. Run Task Manager (Ctrl-Alt-Del or right click on Taskbar)
  2. Stop wscript.exe process if available by highlighting the process name and clicking End Process.
  3. Then terminate explorer.exe process.
  4. In Task Manager, click on File -> New Task (Run…).
  5. Type “cmd” (without quotes) into the Open text box and click OK.
  6. 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 /a

    c, 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.

  7. In Task Manager, click on File -> New Task (Run…).
  8. Type “regedit” (without quotes) into the Open text box and click OK.
  9. Navigate to the following registry key:

    HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon

  10. 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.


122 Responses to “Unable to Open Hard or USB Flash Drive with Windows Script Host Cannot Find Script File autorun.vbs Error”

Pages: « 5 4 3 2 [1] Show All

  1. stamos
    June 27th, 2007 17:09
    25

    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.

  2. MR. 666
    June 27th, 2007 05:03
    24

    Thank you! I used this solution to help one of my clients. Kudos.

  3. abinit
    June 24th, 2007 21:21
    23

    how can you get this?

  4. Dinesh S Kumar
    June 17th, 2007 01:01
    22

    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”

  5. Tom
    June 11th, 2007 00:27
    21

    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.

  6. pesti
    June 2nd, 2007 18:21
    20

    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

  7. saikat
    June 2nd, 2007 03:08
    19

    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..

  8. pesti
    June 1st, 2007 22:19
    18

    it doesn’t work for me :(

  9. Roald
    May 22nd, 2007 19:44
    17

    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.

  10. Ravi
    May 20th, 2007 18:48
    16

    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

  11. geokeratz
    May 18th, 2007 10:20
    15

    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

  12. admin
    May 17th, 2007 17:10
    14

    Bert, have you try Safe Mode?

  13. Liar
    May 17th, 2007 16:59
    13

    C’mon man…u blew it up..why the hell u played with that comma.

    aahh…

  14. Bert
    May 17th, 2007 16:14
    12

    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

  15. Iswandy
    May 15th, 2007 18:16
    11

    Hey, it works!!! I had the problem for few months and after trying out your suggestion, it doesn’t bother me anymore! =)

  16. Badhurudheen Hassan
    May 15th, 2007 00:08
    10

    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

  17. Edekin
    May 14th, 2007 22:13
    9

    Thank you for your help. It solved the problem I was experiencing.

  18. rajeev
    May 11th, 2007 18:21
    8

    but when i delete that in usb and reinsert again, it dont open. virus still persists.. what to do now

  19. Rodrigo
    May 10th, 2007 02:37
    7

    Dfinitely u made my day 2!

  20. Kash
    May 8th, 2007 05:21
    6

    Thanxxx man ,,u made my day

  21. Rozh
    May 6th, 2007 19:14
    5

    hi thanks for help

    im from kurdistan

  22. buRpee
    May 5th, 2007 00:36
    4

    great post! thanks!

  23. Aaron
    April 30th, 2007 03:52
    3

    thanks for ur way to clean d autorun.vbs trojan.it really works…thanks!!

  24. admin
    April 19th, 2007 21:43
    2

    Hi kay, thanks for suggestion, will look into it soon.

  25. kay
    April 19th, 2007 19:27
    1

    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

Pages: « 5 4 3 2 [1] Show All

Leave a Reply

You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

Subscribe to comments feature has been disabled. To receive notification of latest comments posted, subscribe to My Digital Life Comments RSS feed or register to receive new comments in daily email digest.
Custom Search

New Articles

Incoming Search Terms for the Article

usb.wsf - cannot find script file usb.wsf - can not find script file usb.wsf - unable to open usb flash drive - unable open hard disk - cant use my USB with an error ''window script host" - cannot find script file .vbs - can not find script file - gova.vbs remover - what is usb.wsf - usb.wsf error - can not find script file vbs - usb anti autorun/usb.wsf - choose the program you want to use to open this file - cannot find script file anti.vbs - usb.wsf virus - c:\program files\usb anti autorun\usb.wsf - how do you open a usb file - virus cleaner+gova - unable to open pen drive on double click - unable to open external hard disk - USB open program - windows script host cannot find script file - all - cannot open usb flash drive - removing autorun.vbs - unable to open script file usb - can't open flash jargon script - gova.vbs - usb drive open with - cannot find script file c windows jargon.vbs - can not find script file .vbs - can not find script file system.vbs - removing gova.vbs - unable to open the drives - usb device choose program to open - vbs remover - cannot find script file C:\bungoton.vbs - can not find script file H:\\usb.wsf - unable to open usb drive - unable to open c drive by double clicking - autorun remover - cannot find script files USB.wsf - cannot open usb drive - how to delete gova.vbs virus from usb - how to remove usb.wsf - usb anti autorun\usb.wsf - usb wsf - c:\autorun.vbs - cannot find script file auto1.vbs -