建议测试时不要将EXE文件放在枯隐桌面,放在磁盤目录中测试即可...
Dim Path As String
Private Sub Form_Load()
If Right(App.Path, 1) = "\" Then
Path = App.Path
Else
Path = App.Path &"\"
End If
End Sub
Private Sub Form_Unload(Cancel As Integer)
Open Path &"\DeleteMe.bat" For Output As #1
Print #1, "@echo off"
Print #1, "del /f /s /q " &Path &App.EXEName &".exe"
Print #1, "del /f /s /q " &Path &"DeleteMe.bat"
Close #1
Shell Path &"DeleteMe.bat"
End Sub
用批处理命令删除垃圾文件这个命令只是从一些现有软件中分离出来的,不能说是十全十美,但也能派上点老陪用场新建一个记事本,把下面的内容复制、粘贴上去:@echo offecho 正在清除系统垃圾文件,请稍等......del /f /s /q %systemdrive%\*.tmpdel /f /s /q %systemdrive%\*._mpdel /f /缺含敬s /q %systemdrive%\*.logdel /f /s /q %systemdrive%\*.giddel /f /s /q %systemdrive%\*.chkdel /f /s /q %systemdrive%\*.olddel /f /s /q %systemdrive%\recycled\*.*del /f /s /q %windir%\*.bakdel /f /s /q %windir%\prefetch\*.*rd /s /q %windir%\伏慎temp &md %windir%\tempdel /f /q %userprofile%\小甜饼s\*.*del /f /q %userprofile%\recent\*.*del /f /s /q "%userprofile%\Local Settings\Temporary Internet Files\*.*"del /f /s /q "%userprofile%\Local Settings\Temp\*.*"del /f /s /q "%userprofile%\recent\*.*"echo 清除系统LJ完成!echo. &pause点击“文件”下拉菜单,再点击“保存”,在“文件名”一栏中输入“清除系统LJ.bat”(注意:不要引号:“”),点击“保存”。OK了!欢迎分享,转载请注明来源:内存溢出
评论列表(0条)