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...

Advertisement
Free Agile Project Management Tool from Telerik
TeamPulse Community Edition helps your team effectively capture requirements, manage project plans, assign and track work, and most importantly, be continually connected with each other.
Category: Security | Other Posts: View all posts by this blogger | Report as irrelevant | View bloggers stats | Views: 4780 | Hits: 859

Similar Posts

  • Multi-Targeting Support (VS 2010 and .NET 4 Series) more
  • Platform Agnostic apps failing on a 64 bit machine. more
  • Getting the App’s Startup Assembly in WPF Designer? more
  • Resx and BAML Resources in WPF more
  • .NET 4.0 -- AssemblyBuilderAccess.RunAndCollect more
  • TipJar: Title Tags and Master Pages more
  • Azure Table Storage Gotcha more
  • Win7 Rocks more
  • Extending the IIS Configuration System using COM more
  • Powershell script to batch-update AssemblyInfo.cs with new Version more

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