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. patelsudarshan
    April 26th, 2008 01:00
    100

    m not able to open up my hard disks with double click…. error is OPEN WITH….
    TO OPEN IT HAV TO EXPLORE THE HARD DISK …. NEED TO GET HELP TO SOLVE MY PROB….
    I NEED OPEN IT WITH DOUBLE CLICK…
    M USING WINDOWS XP, P4….
    THANX IN ADVANCE

  2. Mohdsanil
    April 22nd, 2008 13:18
    99

    Thank you!!!
    thts worked yaar….thanks again,
    is there any chance again if i put flash drive ? any way its gud for alll…
    keep on working for good deeds..

  3. paolo
    April 20th, 2008 18:21
    98

    Thank you too. I used the flash disinfector but it doesn’t clean out the registry completely. Your instructions helped clean them out.

  4. princess
    April 10th, 2008 09:13
    97

    thank you!

  5. SHAKO » Blog Archive » 문제해결 | 플래쉬 메모리에서 autorun.vbs
    April 7th, 2008 18:43
    96

    [...] 참고 사이트 http://www.mydigitallife.info/2007/04/19/unable-to-open-hard-or-usb-flash-drive-with-windows-script-... [...]

  6. t.c.
    March 24th, 2008 17:16
    95

    genius! thanks.

  7. naman
    March 23rd, 2008 11:39
    94

    hello sir,its worked like miracle for me

  8. Revathy
    March 17th, 2008 15:34
    93

    in my laptop all drives open in explorer format(i.e., open with) how to remove that. and guide me to open the drives in normal way

  9. Justin
    March 15th, 2008 02:58
    92

    thanks so much!! :D . it worked!

  10. Joe
    March 14th, 2008 10:22
    91

    I used AVG to clear off the VBS Psyme virus and then I got the Windows Script Host error. This solution worked great. Thanks for the info.
    Joe

  11. Krishna
    March 9th, 2008 09:39
    90

    Thank you .It worked

  12. autorunvirus
    March 7th, 2008 15:28
    89

    very easy!

    1).Download this file from my website and double click on it. Here is the link
    http://autorunvirus.googlepages.com/Removesub7chatx.netVirus.vbs

    OR

    Copy below code.
    Paste in notepad or Wordpad.
    Save As yourname.VBS
    Double click on it to run that script.

    Dim ObjFileSys, VirusFileNames, Dimension

    CONST FolderSystem32 = 1
    VirusFileNames = Array(”\autorun.inf”,”\mma.bat”,”\mma.rar”,”\mma.reg”,”\mma.vbs”)

    Set ObjFileSys = CreateObject(”Scripting.FileSystemObject”)

    Call DeleteRegistry()
    Call CleanSystem32()
    Call CleanAllDrives

    Set ObjFileSys = Nothing
    MsgBox “Done”
    WScript.Quit

    Sub CleanSystem32()
    Dim SysFolder
    Set SysFolder = ObjFileSys.GetSpecialFolder(FolderSystem32)
    For Dimension = LBound(VirusFileNames) To UBound(VirusFileNames)
    if ObjFileSys.FileExists(SysFolder.Path & VirusFileNames(Dimension)) Then DeleteThisFile SysFolder.Path & VirusFileNames(Dimension)
    Next
    Set SysFolder = Nothing
    End Sub
    Sub CleanAllDrives()
    Dim Drive, Drives
    Set Drives = ObjFileSys.Drives
    For Each Drive in Drives
    For Dimension = LBound(VirusFileNames) To UBound(VirusFileNames)
    if ObjFileSys.FileExists(Drive.Path & VirusFileNames(Dimension)) Then DeleteThisFile Drive.Path & VirusFileNames(Dimension)
    Next
    Next
    Set Drives = Nothing
    End Sub
    Function DeleteThisFile(FileName)
    Dim File
    Set File = ObjFileSys.GetFile(FileName)
    File.attributes =0
    File.Delete True
    Set File = Nothing
    End Function
    Sub DeleteRegistry()
    Dim WSHShell, SysFolder
    Set SysFolder = ObjFileSys.GetSpecialFolder(FolderSystem32)
    Set WSHShell = WScript.CreateObject(”WScript.Shell”)

    WshShell.RegWrite “HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon\Userinit”, SysFolder.Path & “\userinit.exe”

    WScript.DisconnectObject WSHShell
    Set WSHShell = Nothing
    End Sub

    2). Restart your system and right-click on your drives to verify that this virus has been removed.

    3). If the Sub7@Chatx.net still remains after restart, try repeating the whole process again.

  13. ris
    March 7th, 2008 12:10
    88

    THANK YOU.

  14. Shabi
    March 7th, 2008 07:11
    87

    heyyyy..
    what a lovely solution, well explained
    thanx a lot for your great help, I could have opened my USB drives without it (using simple folder explore) but I hate when double clicking results in odd messages.

    thanx again – just for u to know – it took me a while finding u and ur solution.. but the research was resulting and payd off :)

    thanx

  15. Jay Momin
    February 27th, 2008 03:55
    86

    I cracked my brain on these virus for days and finally found NOD32 Anti Virus and it removes autorun.inf from my PC and also all the UBS devices.

  16. Jill De Scenna
    February 26th, 2008 17:20
    85

    Hi guys! This solution shows promise. Im gonna do it when I get home. But will this work for Windows XP? Sorry, I’m not that techy.. I just noticed one of the commands with “WindowsNT”…

  17. zeom
    February 14th, 2008 07:57
    84

    Thanks for the solution dude!

  18. Master Yoh
    February 12th, 2008 19:42
    83

    & be careful not to mess up with the System Registry..

    or your pc will be a dead meat..

    A reminder: Hard Drives & USB drives has no use of AUTORUN.INF (in any cases), so if you find it in the root directory/folder on those drives, deleted it..

  19. Master Yoh
    February 12th, 2008 19:37
    82

    You forgot to delete the VBS files.. =p

    P.S.

    In some version, a .DLL or .EXE file is also accompany in the autorun worm/virus.. & sometimes the RUN, cmd, REGEDIT, Folder Options and either the Task Manager is disabled.

    Go to DOS mode, then follow the instructions above..

  20. Nimesh
    February 10th, 2008 20:04
    81

    This problem will fixed easily by quickheal total security2008. Just download the free trial version and install. After scan you have to reboot the system, and U will find that the problem with Autorun.inf have gone. The download link given bellow….

    http://www.quickheal.co.in/small-desktop-edition-win.asp

  21. The Power of Information Technology :: Cure for Sub7@chatx.net virus :: February :: 2008
    February 7th, 2008 14:38
    80

    [...] Source [...]

  22. Sunny Ahuja
    February 2nd, 2008 09:44
    79

    Thanks Alot for the solution

  23. Ahsan
    February 2nd, 2008 02:25
    78

    Excellent, thanks a lot for sharing the solution, solved most of my problems, although on my machine virus was ylr.exe and wo8wr9.exe instead of ravmon.exe .. thanks again

  24. The Power of Information Technology :: Cure for Sub7@chatx.net virus :: February :: 2008
    February 1st, 2008 19:56
    77

    [...]         Source [...]

  25. Anjula
    January 31st, 2008 18:12
    76

    Thanks a lot.
    :)

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 - can not find script file usb.wsf - cannot 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 - choose the program you want to use to open this file - gova.vbs - usb anti autorun\usb.wsf - what is usb.wsf - usb.wsf error - can not find script file vbs - usb anti autorun/usb.wsf - cannot find script file anti.vbs - usb.wsf virus - c:\program files\usb anti autorun\usb.wsf - cannot find script file auto1.vbs - how do you open a usb file - virus cleaner+gova - can not open usb flash drive - 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 - 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 - choose program to open file thumbdrive - 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 -