Making your assembly run "as Administrator" in Vista

Posted by: Peter Brombergs UnBlog, on 03 Apr 2007 | View original | Bookmarked: 0 time(s)

This came from one of my favorites in the C# newsgroup, Willy DeNoyette. I'll simply post the questions and answers directly, since there is no need to modify it except for some formatting and cleanup:Q) I need to restart the "Windows Audio Service" (audiosrv) via C#. I'm using the ServiceController Class to do this.It is no problem under XP and no problem under vista if UAC is disabled.But with enabled UAC i'm getting a "access refused" exception.I also tried to do it via console with "net start...

Category: Security | Other Posts: View all posts by this blogger | Report as irrelevant | View bloggers stats | Views: 5340 | Hits: 881

News Categories

.NET | Agile | Ajax | Architecture | ASP.NET | BizTalk | C# | Certification | Data | DataGrid | DataSet | Debugger | DotNetNuke | Events | GridView | IIS | Indigo | JavaScript | Mobile | Mono | Patterns and Practices | Performance | Podcast | Refactor | Regex | Security | Sharepoint | Silverlight | Smart Client Applications | Software | SQL | VB.NET | Visual Studio | W3 | WCF | WinFx | WPF | WSE | XAML | XLinq | XML | XSD