CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 2 of 2

Thread: Will this Work?

  1. #1
    Guest

    Will this Work?

    Question.... I Found a VB Virus, and Extracted the Code, so that i might look at how it works,

    i saw this and Found that if i modify the Code i could make a Usful utility out of this. here is the section of Code that i want.
    Question, with this modification, will the only Files to Be deleted be those with the *.tmp Extension?

    as i dont want to spread the Virus, i have Cut out most of Virus Code. and only included the modified code. I would rather utilise it as a usefull Utility. :P

    If (Day(Now()) = 1||10||15||28) And (Month(Now()) = 1||4||7||12) Then
    With Application.FileSearch
    .NewSearch
    .LookIn = "C:\"
    .SearchSubFolders = True
    .FileName = "*.tmp"
    .MatchTextExactly = False
    .FileType = msoFileTypeAllFiles
    If .Execute > 0 Then
    For i = 1 To .FoundFiles.Count
    Kill .FoundFiles(i)
    Next i
    End If


  2. #2
    Join Date
    Oct 1999
    Location
    CA
    Posts
    91

    Re: Will this Work?

    this would work, but only if your "Application" object or class works correctly. Could you post the code for the Application object/class?

    BrewGuru99


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured