Try this:
//Vista or higher check
if (System.Environment.OSVersion.Version.Major >= 6)
{
p.StartInfo.Verb = "runas";
}
Alternatively, go the manifest route for your application.
More Related Contents:
- Get the correct week number of a given date
- Why do we need boxing and unboxing in C#?
- Get output parameter value in ADO.NET
- Enum type constraints in C# [duplicate]
- Is a memory leak created if a MemoryStream in .NET is not closed?
- Why are C# structs immutable?
- process.WaitForExit() asynchronously
- Enter “&” symbol into a text Label in Windows Forms?
- Relocating app.config file to a custom path
- String escape into XML
- Disable JavaScript error in WebBrowser control
- Disposing WPF User Controls
- GUI and windows service communication
- Metadata were not loaded using MetadataType
- GC.Collect()
- Writing string at the same position using Console.Write in C# 2.0
- C# Windows Form .Net and DOS Console
- .NET Core and System.Drawing
- How to set read permission on the private key file of X.509 certificate from .NET
- Does String.GetHashCode consider the full string or only part of it?
- How would I sort a list of files by name to match how Windows Explorer displays them?
- Why doesn’t C# support implied generic types on class constructors?
- Reflection.Emit vs CodeDOM
- Why choose a static class over a singleton implementation?
- Async and Await with For Loop [duplicate]
- Could not load file or assembly ‘System.Windows.Interactivity’ [duplicate]
- Understanding Covariance and Contravariance in C# 4.0
- Alternative for Obfuscation in the .NET world
- caching the result from a [n async] factory method iff it doesn’t throw
- CPU friendly infinite loop