no access to HKCR although beeing administrator and UAC is off RRS feed

  • Question

  • Hi,

    my application tries to write some regvalues below HKCR in registry.

    I'm aware that for this one need to have administrator privileges and also UAC must allow it.

    In my situation the logged on user IS Administrator and the UAC level is OFF.

    And yet, when running my application on Win 8 an exception is thrown, when opening the key for writing ("no permission")

    I asked the user to open the registry and do the modification manually with regedit and he can.

    Only since my app ist started by contextmenu "run as administrator" permission is allowed.

    Why is an application not automatically startet as Administrator when the logged on user IS Administrator and moreover UAC is OFF ??

    Tuesday, March 26, 2013 7:59 AM

All replies

  • UAC off in Windows 8 = medium IL process

    UAC off in Windows 7 = high 

    It is a design change to improve the OS's security. 

    If your code requires administrator access, declare requireAdministrator in your application manifest or call it Setup/Update or something like that. But if all you need to write is your private data, consider writing to common application data\CompanyName\ProductName.

    Visual C++ MVP

    Tuesday, March 26, 2013 2:31 PM