Advertisement
Guest User

Untitled

a guest
Dec 30th, 2014
34
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
VB.NET 1.60 KB | None | 0 0
  1. Imports System.IO
  2. Imports Microsoft.Win32
  3. Public Class Form1
  4.     Public regKey1 As Object
  5.     Public regKey2 As Object
  6.     Private Sub Form1_Load(sender As System.Object, e As System.EventArgs) Handles MyBase.Load
  7.  
  8.         regKey1 = My.Computer.Registry.GetValue("HKEY_CURRENT_USER\Software\ShopAssist", "SVPath", Nothing)
  9.         regKey2 = My.Computer.Registry.GetValue("HKEY_CURRENT_USER\Software\GSANOGUI", "SVPath", Nothing)
  10.         '        On Error Resume Next
  11.         If regKey1 <> Nothing Then
  12.             RichTextBox2.Text = "GSA Settings Found"
  13.         Else
  14.             RichTextBox2.Text = "Nothing Found For GSA"
  15.         End If
  16.         If regKey2 <> Nothing Then
  17.             RichTextBox1.Text = "GSA (No GUI) Setttings Found"
  18.         Else
  19.             RichTextBox1.Text = "Nothing Found For GSA (No GUI)"
  20.         End If
  21.     End Sub
  22.  
  23.     Private Sub Button1_Click(sender As System.Object, e As System.EventArgs) Handles Button1.Click
  24.  
  25.         regKey2 = Registry.CurrentUser.OpenSubKey("software", True)
  26.         regKey2.DeleteSubKey("GSANOGUI", True)
  27.         regKey2.Close()
  28.         RichTextBox1.Text = "Settings Deleted"
  29.  
  30.         regKey1 = Registry.CurrentUser.OpenSubKey("software", True)
  31.         regKey1.DeleteSubKey("ShopAssist", True)
  32.         regKey1.Close()
  33.         RichTextBox2.Text = "Settings Deleted"
  34.  
  35.         MsgBox("All registry entries for GSA have been deleted.", MsgBoxStyle.OkOnly, "Guild Sales Assistant")
  36.     End Sub
  37.  
  38.     Private Sub Button2_Click(sender As System.Object, e As System.EventArgs) Handles Button2.Click
  39.         Application.Exit()
  40.     End Sub
  41. End Class
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement