Christian Vucossa programming blog

game programming, daily troubles and solutions

Posts Tagged ‘windows mobile’

Windows Mobile and the “unknown publisher” exception

Posted by Christian on December 9, 2008

A few days ago I was deploying a new version of a software of mine on a PDA running Windows Mobile 6.0 and I have had to deal with a boring “unknown publisher” prompt. My new compiled dll was not recognized as trusted. What to do to get rid of this nuisance?

Well, I found this helpful link where the guy explains how to do but lacks of some important details so that I was obliged to surf again to fix. At the end of the story, I found a way.

To get rid of the message we have to edit a registry key. My app was in .NET (C#), and here is the code that fix the problem:

string keyname = “0000101a”;
RegistryKey securityKey = Registry.LocalMachine.OpenSubKey(“Security”)
.OpenSubKey(“Policies”).OpenSubKey(“Policies”, true);
object val = securityKey.GetValue(keyname);
securityKey.SetValue(keyname, 1, RegistryValueKind.DWord);

Hope this helps.

Posted in exception solving | Tagged: , | Leave a Comment »

 
Follow

Get every new post delivered to your Inbox.