Sep 222012

With the changes to the UAC system in Windows 8, it seems that whenever you try to launch an non-elevated application from an elevated application, you get an error similar to: “Class not registered (Exception from HRESULT: 0x80040154 (REGDB_E_CLASSNOTREG)”.

The reason is that under Windows 8, even if you set UAC to the lowest setting, you don’t disable it completely.

In my case, I was trying to start an URL using the default browser from an elevated application. After a lot of digging around on and other blogs and websites, I’ve managed to build a solution that seems to be working.

The solution relies on the UacHelper class from this stackoverflow post:

The code checks if UAC is enabled and if you are running under an elevated account. If this is the case, instead of passing the URL directly (which leads to an error), it starts explorer.exe with the URL as the argument. The “runas” verb is an undocumented verb which basically makes the process run under administrative privileges:

A more complete alternative is provided also by the UAC Helpers project on CodePlex:, but the library is at the moment only in alpha stage (although I believe that it should work properly). The biggest downside is that the library is done in C++/CLR so for me this was a roadblock.

Shout it