简体   繁体   中英

Admin and ClickOnce C# Visual Studio 2008/2012

My C# application needs to run with admin privileges however, I cannot publish it due to ClickOnce restrictions.

I have been searching for a resolution to this, however, I have yet to find one that works.

The most common suggestion is to add an installer to the project, however, I don't have seem to have in either my version of Visual Studio 2008 or Visual Studio 2012.

Can anyone offer me any suggestions of how I can publish a C# project with admin privileges?

The following article describes how to have a ClickOnce application launch itself with admin privilieges - maybe this helps? http://antscode.blogspot.de/2011/02/running-clickonce-application-as.html

WiX is a (free) tool for creating installation packages. I do not have any experience with it myself but it seems that you can use WiX for UAC elevation when running the installation.

I did a search for WiX and UAC and it seems that lots of people are using WiX when UAC is required - eg this article: http://blogs.msdn.com/b/astebner/archive/2006/12/13/some-useful-things-i-have-learned-about-windows-installer-and-uac.aspx .

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM