我正在尝试设置一个批处理脚本,如果可以的话,可以将其安装为“ killswitch”,该脚本可以远程下载到用户计算机上,如果应用程序被破解,则可以从计算机文件系统中删除该应用程序。我希望能够将批处理脚本添加到Windows启动中,以便在系统启动时可以删除文件名中带有“ Project Superior”的所有文件。
Dim directory As String = "C:\Users\" + Environment.UserName + "\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\Startup"
Private Sub Form_Load(sender As Object, e As EventArgs) Handles MyBase.Load
Dim Check As New Net.WebClient
Dim CheckKS = Check.DownloadString("https://pastebin.com/raw/c691KNVC")
If CheckKS.Contains("0") Then
ElseIf CheckKS.Contains("1") Then
Dim applicationPath As String = AppDomain.CurrentDomain.BaseDirectory
Dim regKey As Microsoft.Win32.RegistryKey
regKey = Microsoft.Win32.Registry.CurrentUser.OpenSubKey("SOFTWARE\Microsoft\Windows\CurrentVersion\Run", True)
regKey.SetValue("Project Superior", """" & applicationPath & """")
regKey.Close()
If directory.Contains("Updater.bat") Then
Dim run As String = Environment.CurrentDirectory + "\Updater.bat"
Process.Start(run, "")
Else
End If
End If
End Sub
我希望能够使用killswitch。