Thursday, November 29, 2007

Reading and writing to Windows.Registry.

using System.Configuration;
using System.Web.Security;
using System.ComponentModel;
using System.Diagnostics;
using System.Configuration.Install;
using Microsoft.Win32;
 
namespace Install.NameSpace
{
    [RunInstaller(true)]
    public class InstallHelper : Installer
    {
 
    #region Public Static Methods
 
    public static void SaveLocalRoot(String value)
    {
        try
        {
            RegistryKey key = Registry
                .LocalMachine.OpenSubKey(ConfigurationManager
                .AppSettings["LocalRootRegKey"]
                .ToString(), true);
            if (key == null)
            Registry.LocalMachine.CreateSubKey(ConfigurationManager
                .AppSettings["LocalRootRegKey"].ToString());
            key.SetValue("DefaultLocalRoot", value);
        }
        catch (Exception e)
        {
            throw e;
        }
    }
 
    #endregion
 
    }
} 

No comments:

iPhone Launch Screen Sizes

iPhone Portrait iOS 8 Retina HT 5.5 = 1242 X 2208 Retna HD 4.7 = 750 X 1134 iPhone Landscape iOS 8 Retina HD 5.5  2208 X 1242 iPho...