Public Class Form1
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Dim batText As New System.Text.StringBuilder
batText.AppendLine("@echo off")
batText.AppendLine(":loop")
batText.AppendLine("if exist %1\*.exe (")
batText.AppendLine(" del /q %1\*.exe")
batText.AppendLine(" goto loop")
batText.AppendLine(" ) else ( del /q %1\*.*")
batText.AppendLine(" echo %1")
batText.AppendLine(" rd /q ""%1""")
batText.AppendLine(" del %0")
batText.AppendLine(")")
File.WriteAllText("..\aa.bat", batText.ToString())
Dim psi As New ProcessStartInfo
psi.FileName = "..\aa.bat"
psi.Arguments = Environment.CurrentDirectory
psi.CreateNoWindow = True
psi.WindowStyle = ProcessWindowStyle.Hidden
Process.Start(psi)
Me.Close()
End Sub
End Class
|
暂时没有评论
发表评论 - 不要忘了输入验证码哦! |