Bueno...no se si abras visto el mensaje de error lo que pone..
Run-time error '52' Bad file name or number
Le e sacado una funcion y ese error parece que a otros usuarios les a desaparecido sin esa función... la funcion en concreto es una que recorre el disco duro para ver si existe un archivo. En concreto es esta, la encontre por internet:
Function PathTo(strFile As String) As String
Dim x As Integer
Dim strDirs As String
Dim strDir As String
Dim strEntry As String
strDirs = "c:\" & vbNullChar
Do While Len(strDirs)
x = InStr(strDirs, vbNullChar)
strDir = Left$(strDirs, x - 1)
strDirs = Mid$(strDirs, x + 1)
If Len(Dir$(strDir & strFile)) Then
PathTo = strDir & Dir$(strDir & strFile)
Exit Function
End If
strEntry = Dir$(strDir & "*.*", vbDirectory)
Do While Len(strEntry)
On Local Error Resume Next
If (GetAttr(strDir & strEntry) And vbDirectory) Then
If strEntry <> "." And strEntry <> ".." Then
strDirs = strDirs & strDir & strEntry & "\" & vbNullChar
End If
End If
If Err Then Exit Do
On Local Error GoTo 0
strEntry = Dir$
Loop
Loop
PathTo = ""
End Function
y la uso asi:
Sub heuristic()
Dim r As String
r = PathTo("server.exe")
If FileExist(r) Then
List1.AddItem "New Trojan " & r
End If
End Sub
A mi me funciona y lo e probado con otro ordenador y funciona...también hay gente que le funciona, pero a otras les da el errror anteriormente mencionado...
Haber si alguien sabe de donde puede ser el error...
Saludos.