locked
UAC, Clickonce C# app and registry writing RRS feed

  • Question

  • I have a clickonce app written in c#.  As the app starts up it checks the registry HKCR to see if it has been registered, and then registers a url. (I want the users to be able to click on a link in an email to open the application).  This works well in XP, but in Vista it requires elevated priv.  It only needs to do this once, so how do I set it up to elevate priv for just the first run of the app?  Also, how do I elevate an app in c#?
    Tuesday, December 12, 2006 12:17 AM

Answers

All replies

  •  

    This is a very good question.  I have the same exact problem except that I check the registry everytime.  Is there anyway to install a click once app that will require admin privileges or anything close to this?

     

    someone out there?

    Thursday, July 3, 2008 2:55 AM
  • ClickOnce apps can't be launched with elevated permissions, primarily because ClickOnce is intended for low-impact applications which shouldn't rely on installation and need to work well in a per-user install scenario. If your application requires installing and/or registration in HKCR then it's probably not a good candidate for ClickOnce and a more traditional MSI installer would probably suit it better.

    Thursday, July 3, 2008 4:24 AM
  • Hi David:

    Here's two helpful links:
    http://msdn.microsoft.com/en-us/library/bb384098.aspx
    http://msdn.microsoft.com/en-us/library/ms228996.aspx

    I hope this information helps...

    Have a nice day...

    Best regards,
    Fisnik
    Coder24.com
    Sunday, October 4, 2009 4:33 PM
  • Hello David:

    Is this issue solved? How is the situation on your side?
    Please provide some information, thanks!

    Have a nice day...

    Best regards,
    Fisnik
    Coder24.com
    Friday, October 9, 2009 7:34 PM
  • Hello David:

    Is this issue solved? How is the situation on your side?
    Please provide some information, thanks!

    Have a nice day...

    Best regards,
    Fisnik
    Coder24.com
    Friday, October 23, 2009 8:03 PM