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
- PHP 5 Unable to Open HTTP Request Stream with fopen or fsockopen Functions
- Firefox Unresponsive Script: Increase JavaScript Execution Waiting Time
- Block, Hide and Remove Windows Live Mail Ads
- PHP Allowed Memory Size Exchausted Fatal Error
- Script to Backup Current Start State (Startup Type) of Windows Services
- Fix Windows XP and 2003 Require Activation on Every Boot Even After Activated Error
- Virus Infections via USB Drive
- Show Current Working Folder or Directory Full Path in Batch Command Script
- Change IE Title Bar or TitleBar Text Description (including IE7)
- Rapid Leech Download from RapidShare, MegaUpload, Uploading, MyTempDir and Other File Sharing Services to Server










































April 26th, 2008 01:00
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
April 22nd, 2008 13:18
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..
April 20th, 2008 18:21
Thank you too. I used the flash disinfector but it doesn’t clean out the registry completely. Your instructions helped clean them out.
April 10th, 2008 09:13
thank you!
April 7th, 2008 18:43
[...] 참고 사이트 http://www.mydigitallife.info/2007/04/19/unable-to-open-hard-or-usb-flash-drive-with-windows-script-... [...]
March 24th, 2008 17:16
genius! thanks.
March 23rd, 2008 11:39
hello sir,its worked like miracle for me
March 17th, 2008 15:34
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
March 15th, 2008 02:58
thanks so much!!
. it worked!
March 14th, 2008 10:22
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
March 9th, 2008 09:39
Thank you .It worked
March 7th, 2008 15:28
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.
March 7th, 2008 12:10
THANK YOU.
March 7th, 2008 07:11
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
February 27th, 2008 03:55
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.
February 26th, 2008 17:20
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”…
February 14th, 2008 07:57
Thanks for the solution dude!
February 12th, 2008 19:42
& 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..
February 12th, 2008 19:37
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..
February 10th, 2008 20:04
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
February 7th, 2008 14:38
[...] Source [...]
February 2nd, 2008 09:44
Thanks Alot for the solution
February 2nd, 2008 02:25
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
February 1st, 2008 19:56
[...] Source [...]
January 31st, 2008 18:12
Thanks a lot.