Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

My Windows 7 was recently infected by the system-fix.com virus and it hid all my files and directories. I believe I've removed the virus but I still can't find many files and programs.

Is there a single command-line tool in Windows that can recursively turn off the hidden attribute for an entire drive?

share|improve this question

migrated from serverfault.com Dec 10 '11 at 8:22

This question came from our site for professional system and network administrators.

2  
If your computer has had a virus, the only truly safe thing to do is back up your files and apps and re-install your operating system from fresh media. –  Joel Coehoorn Dec 10 '11 at 3:52
    
Probably should be on SuperUser –  TheLQ Dec 10 '11 at 4:23
1  
SuperUser already has "Computer is infected by a virus or a malware, what do I do now?", note. –  JdeBP Dec 10 '11 at 12:28
add comment

4 Answers

up vote 1 down vote accepted

Unhide is designed specifically to address this symptom.

When run, it will unhide (-H) all +H files on the fixed disks of your computer. It will not, though, unhide any files that also have the +S attribute.

Refer to the Removal Guide for System Fix for further information.

share|improve this answer
add comment

I think attrib -H /S /D should do the trick.

share|improve this answer
add comment

You may also try this simple windows script for unhiding files and directories. It only prompts the user to input the drive letter then executes the vbscript.

Run your notepad, copy the code below, then save it as unhide.vbs

pc_drive = InputBox("Input drive letter" & vbnewline & "example: E:\", "Drive","E:\")
ryt = Right(pc_drive,2)
   If Len(pc_drive) <> 3 or ryt <> ":\" Then
   Call MsgBox("Either your input was invalid or the drive you specified doesn'texist",vbokonly,"Error")
End If

Set FSO = CreateObject("Scripting.FileSystemObject")
ShowSubfolders FSO.GetFolder(pc_drive)

Sub ShowSubFolders(Folder)
   str =""
   For Each Subfolder in Folder.SubFolders
      str =str & " " & Subfolder.Path
      subFolder.Attributes = 0
      ShowSubFolders Subfolder
   Next
End Sub

You could save it in your USB drive for more accessibility. Instruction how to use it can be found in the link below.

Windows Script For Unhiding Folders Hidden By Worm Virus

EDIT: provided the vbscript code.

share|improve this answer
1  
Whilst this may theoretically answer the question, it would be preferable to include the essential parts of the answer here, and provide the link for reference. –  Sathya Jul 23 '12 at 7:28
    
I just edited my answer. I appreciate your suggestion. –  Mr. Xymon Jul 24 '12 at 8:16
    
Thanks for taking the time and adding the content. The reason we ask to do this is to prevent content loss due to link rot. Cheers. –  Sathya Jul 24 '12 at 8:23
add comment

I had the same problem and I found a solution on Stackoverflow (you can take a look at http://stackoverflow.com/questions/8095002/windows-batch-script-to-unhide-files-hidden-by-virus ).

This code will make visible only the directories.

So, create a BAT file ( open the Notepad, copy + paste the below code and rename the file to fix.bat) which will contains:

echo "Enter Drive letter" 
set /p driveletter=

attrib -s -h -a /s /d  %driveletter%:\*.*

Also, I modified a bit the code provided by Mr. Xymon to avoid make Recycled Bin visible and to avoid Windows Permission Error.

Here is the code:

Sub ShowSubFolders(CurrentFolder) 
  ' Skip some folders to avoid Windows Error Message
  If (CurrentFolder.Name <> "RECYCLER") and (CurrentFolder.Name <> "System Volume Information") and (CurrentFolder.Name <> "$RECYCLER.BIN") and (CurrentFolder.Name <> "Config.Msi") Then
    For Each Subfolder in CurrentFolder.Subfolders
      If (Subfolder.Name <> "RECYCLER") and (Subfolder.Name <> "System Volume Information") and (Subfolder.Name <> "$RECYCLER.BIN") and (Subfolder.Name <> "Config.Msi") Then
        Subfolder.Attributes = Subfolder.Attributes AND 0
      End If
      ShowSubFolders(Subfolder)
    Next
  End If
End Sub

' Main program
pc_drive = InputBox("Input drive letter." & vbnewline & vbnewline & "Example: G:\", "Drive","G:\")
ryt = Right(pc_drive,2)
If Len(pc_drive) = 3 or ryt = ":\" Then

  Set FSO = CreateObject("Scripting.FileSystemObject")

  ' Check if the path exists or if the drive is ready
  If FSO.FolderExists(pc_drive) Then
    Call MsgBox("Our script will start after you click OK. Please wait the Finish Message!!!",vbokonly,"Starting...")
    ' TO DO: Add a progress bar here
    ShowSubfolders(FSO.GetFolder(pc_drive))
    Call MsgBox("Done!",vbokonly,"Finished")
  Else
    Call MsgBox("Either your input was invalid or the drive you specified doesn't exist.",vbokonly,"Error")
  End If

End If

Cheers!

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.