Questo sito utilizza cookies solo per scopi di autenticazione sul sito e nient'altro. Nessuna informazione personale viene tracciata. Leggi l'informativa sui cookies.
Username: Password: oppure
Virtual Helper - frmAutoStart.vb

frmAutoStart.vb

Caricato da: Totem
Scarica il programma completo

  1. Imports Microsoft.Win32
  2. Public Class frmAutoStart
  3.     Private Sub cmdLCreate_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles cmdLCreate.Click
  4.         Dim W As New IO.StreamWriter("C:\Documents And Settings\All Users\Menu Avvio\Programmi\Esecuzione Automatica\VH.bat")
  5.         W.WriteLine(Application.ExecutablePath)
  6.         W.Close()
  7.         MsgBox("Collegamento creato!", MsgBoxStyle.Information)
  8.     End Sub
  9.     Private Sub cmdLDelete_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles cmdLDelete.Click
  10.         Try
  11.             Kill("C:\Documents And Settings\All Users\Menu Avvio\Programmi\Esecuzione Automatica\VH.bat")
  12.             MsgBox("Collegamento eliminato!", MsgBoxStyle.Information)
  13.         Catch FNFE As IO.FileNotFoundException
  14.  
  15.         End Try
  16.     End Sub
  17.     Private Sub cmdRCreate_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles cmdRCreate.Click
  18.         Dim RegKey As RegistryKey
  19.         RegKey = Registry.CurrentUser.OpenSubKey("Software", False).OpenSubKey("Microsoft", False).OpenSubKey("Windows", False).OpenSubKey("CurrentVersion", False).OpenSubKey("Run", True)
  20.         RegKey.SetValue("VirtualHelper", Application.ExecutablePath)
  21.         MsgBox("Voce aggiunta!", MsgBoxStyle.Information)
  22.     End Sub
  23.     Private Sub cmeRDelete_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles cmeRDelete.Click
  24.         Dim RegKey As RegistryKey
  25.         RegKey = Registry.CurrentUser.OpenSubKey("Software", False).OpenSubKey("Microsoft", False).OpenSubKey("Windows", False).OpenSubKey("CurrentVersion", False).OpenSubKey("Run", True)
  26.         RegKey.DeleteValue("VirtualHelper")
  27.         MsgBox("Voce eliminata!", MsgBoxStyle.Information)
  28.     End Sub
  29. End Class