Start your application un-elevated and then elevate if you need to.
You can use a method like this to restart the application elevated:
Public Shared Sub RestartElevated(Optional ByVal args As String = "")
' Elevate the process if it is not run as administrator.
If (Not IsRunningAsAdmin()) Then
' Launch itself as administrator
Dim proc As New ProcessStartInfo
proc.UseShellExecute = True
proc.WorkingDirectory = Environment.CurrentDirectory
proc.FileName = Application.ExecutablePath
proc.Verb = "runas"
proc.Arguments = args
Try
Process.Start(proc)
Catch
' The user refused the elevation.
Return
End Try
Application.Exit() ' Quit itself
Else
'The process is already running as administrator
End If
End Sub
Public Shared Function IsRunningAsAdmin() As Boolean
Dim principal As New WindowsPrincipal(WindowsIdentity.GetCurrent)
Return principal.IsInRole(WindowsBuiltInRole.Administrator)
End Function
Bear in mind though that the user may not be able to (or want to) elevate to administrator level.