ProcessStartInfo processStartInfo = new ProcessStartInfo
{ FileName = "calc.exe" };
if (Environment.OSVersion.Version.Major >= 6)
processStartInfo.Verb = "runas";
processStartInfo.Arguments = "";
processStartInfo.WindowStyle = ProcessWindowStyle.Normal;
processStartInfo.UseShellExecute = true;
Process process = null;
try
{
process = Process.Start(processStartInfo);
}
catch (Exception ex)
{
}
finally
{
if (process != null)
process.Dispose();
}
However I would not suggest you do this, unless your service runs with administrative rights, as the user will be prompted to allow the application to be run with elevated permissions on Windows Server 2008, Vista and 7.