2007年12月8日 星期六

Visual C# . NET 程式碼來修改登錄機碼

Visual C# . NET 程式碼來修改登錄機碼
http://support.microsoft.com/kb/313723/zh-tw

using Microsoft.Win32;
//...............................
public void IESetupFooter()
{
string strKey = "Software\\Microsoft\\Internet Explorer\\PageSetup";
bool bolWritable = true; string strName = "footer";
object oValue = "Test Footer";
RegistryKey oKey = Registry.CurrentUser.OpenSubKey(strKey,bolWritable);
Console.Write (strKey);
oKey.SetValue(strName,oValue);
oKey.Close();
}
請注意 您的應用程式必須要有: 讀取和寫入權

沒有留言: