Wednesday, March 11, 2009

Disable Windows Mobile Clock Access



To restrict windows mobile key access they are main two methods.

  1.  You can replace the clock.exe in the window folder by empty application.
  2.  You can change some registry values to prevent opening the clock. I will show how we can use C# to do it
-----------------------------------------------------------------------------------
 using Microsoft.Win32; 
 // import  Microsoft.Win32 top of the class file


 Dissable the clock

RegistryKey hklm = Registry.LocalMachine;
hklm = hklm.OpenSubKey(@"\Software\Microsoft\Clock\", true);

System.Byte[] offValue = new byte[1];
offValue[0] = 0x30;
hklm.SetValue("AppState", offValue);

Enable the clock

 RegistryKey hklm = Registry.LocalMachine;
 hklm = hklm.OpenSubKey(@"\Software\Microsoft\Clock\", true);

System.Byte[] offValue = new byte[1];
offValue[0] = 0x11;
hklm.SetValue("AppState", offValue);
Post a Comment