Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Public Sub RestartElevated()
- Dim startInfo As ProcessStartInfo = New ProcessStartInfo()
- startInfo.UseShellExecute = True
- startInfo.WorkingDirectory = Environment.CurrentDirectory
- startInfo.FileName = Application.ExecutablePath
- startInfo.Verb = "runas"
- Try
- Dim p As Process = Process.Start(startInfo)
- Catch ex As Exception
- Return 'If cancelled, do nothing
- End Try
- Application.Exit()
- End Sub
- youtube.com/kshadow22
Add Comment
Please, Sign In to add comment