Chinaunix首页 | 论坛 | 博客
  • 博客访问: 317108
  • 博文数量: 65
  • 博客积分: 2570
  • 博客等级: 少校
  • 技术积分: 730
  • 用 户 组: 普通用户
  • 注册时间: 2008-08-15 14:04
个人简介

苦逼房奴一枚

文章分类

全部博文(65)

文章存档

2017年(19)

2016年(5)

2013年(6)

2012年(1)

2011年(3)

2009年(5)

2008年(26)

我的朋友

分类: WINDOWS

2008-08-29 13:15:26

可以转载,转载请著名作者和出处,谢谢,特别鄙视转载后扣上自己名字的哥们
 
 
win32_service

Imports System.io
Public Class Service1
    Protected Overrides Sub OnStart(ByVal args() As String)

        FileSystemWatcher1.EnableRaisingEvents = True
    End Sub
    Private Sub FileSystemWatcher1_Created(ByVal sender As Object, ByVal e As System.IO.FileSystemEventArgs) Handles FileSystemWatcher1.Created
        Dim fs As New FileStream("d:\log.txt", FileMode.Append)
        Dim sw As New StreamWriter(fs)
        sw.WriteLine(Now() & Microsoft.VisualBasic.vbTab & "创建" & e.FullPath)
        sw.Close()
        fs.Close()
    End Sub
    Private Sub FileSystemWatcher1_Renamed(ByVal sender As Object, ByVal e As System.IO.RenamedEventArgs) Handles FileSystemWatcher1.Renamed
        Dim fs As New FileStream("d:\log.txt", FileMode.Append)
        Dim sw As New StreamWriter(fs)
        sw.WriteLine(Now() & Microsoft.VisualBasic.vbTab & "重命名" & e.OldFullPath & "-" & e.FullPath)
        sw.Close()
        fs.Close()
    End Sub
    Private Sub FileSystemWatcher1_delete(ByVal sender As Object, ByVal e As System.IO.FileSystemEventArgs) Handles FileSystemWatcher1.Deleted
        Dim fs As New FileStream("d:\log.txt", FileMode.Append)
        Dim sw As New StreamWriter(fs)
        sw.WriteLine(Now() & Microsoft.VisualBasic.vbTab & "删除" & e.FullPath)
        sw.Close()
        fs.Close()
        FileSystemWatcher1.NotifyFilter = NotifyFilters.Size
        Dim fs1 As New FileStream("d:\log.txt", FileMode.Append)
        Dim sw1 As New StreamWriter(fs)
        sw.WriteLine(Now() & Microsoft.VisualBasic.vbTab & "xxxx" & e.FullPath)
        sw1.Close()
        fs1.Close()
    End Sub

End Class

 

日志内容如下

 

2008-7-31 12:01:37 删除C:\TDDOWNLOAD\Serv-U6405\Serv-U6405\KB.ico
2008-7-31 12:01:37 删除C:\TDDOWNLOAD\Serv-U6405\Serv-U6405\KB.url
2008-7-31 12:01:37 删除C:\TDDOWNLOAD\Serv-U6405\Serv-U6405\libeay32.dll
2008-7-31 12:01:37 删除C:\TDDOWNLOAD\Serv-U6405\Serv-U6405\License.txt
2008-7-31 12:01:37 删除C:\TDDOWNLOAD\Serv-U6405\Serv-U6405\Microsoft.VC80.CRT.manifest
2008-7-31 12:01:37 删除C:\TDDOWNLOAD\Serv-U6405\Serv-U6405\MSVCP80.DLL
2008-7-31 12:01:37 删除C:\TDDOWNLOAD\Serv-U6405\Serv-U6405\MSVCR80.DLL
2008-7-31 12:01:37 删除C:\TDDOWNLOAD\Serv-U6405\Serv-U6405\ReadMe.txt
2008-7-31 12:01:37 删除C:\TDDOWNLOAD\Serv-U6405\Serv-U6405\RhinoNET.dll
2008-7-31 12:01:37 删除C:\TDDOWNLOAD\Serv-U6405\Serv-U6405\Serv-U.chm
2008-7-31 12:01:37 删除C:\TDDOWNLOAD\Serv-U6405\Serv-U6405\ServUAdmin.exe
2008-7-31 12:01:37 删除C:\TDDOWNLOAD\Serv-U6405\Serv-U6405\ServUCert.crt
2008-7-31 12:01:37 删除C:\TDDOWNLOAD\Serv-U6405\Serv-U6405\ServUCert.key
2008-7-31 12:01:37 删除C:\TDDOWNLOAD\Serv-U6405\Serv-U6405\ServUDaemon.exe
2008-7-31 12:01:37 删除C:\TDDOWNLOAD\Serv-U6405\Serv-U6405\ServUPerfCount.dll
2008-7-31 12:01:37 删除C:\TDDOWNLOAD\Serv-U6405\Serv-U6405\ServUTray.exe
2008-7-31 12:01:37 删除C:\TDDOWNLOAD\Serv-U6405\Serv-U6405\SetupUtil.exe
2008-7-31 12:01:37 删除C:\TDDOWNLOAD\Serv-U6405\Serv-U6405\ssleay32.dll
2008-7-31 12:01:37 删除C:\TDDOWNLOAD\Serv-U6405\Serv-U6405\Support.ico
2008-7-31 12:01:37 删除C:\TDDOWNLOAD\Serv-U6405\Serv-U6405\Support.url
2008-7-31 12:01:37 删除C:\TDDOWNLOAD\Serv-U6405\Serv-U6405\Version.txt
2008-7-31 12:01:37 删除C:\TDDOWNLOAD\Serv-U6405\Serv-U6405\zlib1.dll
2008-7-31 12:01:37 删除C:\TDDOWNLOAD\Serv-U6405\Serv-U6405\绿盟-首页.url
2008-7-31 12:01:37 删除C:\TDDOWNLOAD\Serv-U6405\Serv-U6405
2008-7-31 12:01:37 删除C:\TDDOWNLOAD\Serv-U6405
2008-7-31 12:01:41 删除C:\TDDOWNLOAD\(001)出师受挫(Pilot).rm
2008-7-31 12:01:48 删除C:\TDDOWNLOAD\dotnetfx35.exe
2008-7-31 12:01:51 删除C:\TDDOWNLOAD\Serv U FTP Server V7.0.0.rar
2008-7-31 12:02:05 创建C:\TDDOWNLOAD\新建 文本文档.txt
2008-7-31 12:02:14 重命名C:\TDDOWNLOAD\新建 文本文档.txt-C:\TDDOWNLOAD\XXOO AV男.txt
2008-7-31 12:02:17 创建C:\TDDOWNLOAD\新建文件夹
2008-7-31 12:02:21 重命名C:\TDDOWNLOAD\新建文件夹-C:\TDDOWNLOAD\我是AV
2008-7-31 13:19:32 删除C:\TDDOWNLOAD\Serv-U6405.rar
2008-7-31 13:19:34 删除C:\TDDOWNLOAD\debian-40r3-i386-netinst.iso
2008-7-31 17:18:10 创建C:\TDDOWNLOAD\ISAPI_Rewrite 2.rar.td.cfg
2008-7-31 17:18:10 创建C:\TDDOWNLOAD\ISAPI_Rewrite 2.rar.td
2008-7-31 17:18:16 删除C:\TDDOWNLOAD\ISAPI_Rewrite 2.rar.td.cfg
2008-7-31 17:18:16 重命名C:\TDDOWNLOAD\ISAPI_Rewrite 2.rar.td-C:\TDDOWNLOAD\ISAPI_Rewrite 2.rar
2008-7-31 17:18:29 删除C:\TDDOWNLOAD\XXOO AV男.txt
2008-7-31 17:18:29 删除C:\TDDOWNLOAD\我是AV
2008-8-4 13:33:01 创建C:\TDDOWNLOAD\新建文件夹
2008-8-4 13:35:15 删除C:\TDDOWNLOAD\新建文件夹


阅读(1713) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~