110,535
社区成员
发帖
与我相关
我的任务
分享
RegistryKey rkCurrentUser = Registry.CurrentUser;
RegistryKey rkLocation = rkCurrentUser.OpenSubKey(string.Format("Software\\Microsoft\\Office\\{0}.0\\{1}\\Security\\Trusted Locations", (int)officeVersion, officeComponents.ToString()), true);
RegistryKey rkLocationSmartLesson = rkLocation.CreateSubKey("LocationSmartLesson");
rkLocationSmartLesson.SetValue("Path", path);
基本上差不多就是这个样子。