Windows 7 安全与后台处理技术解析
1. 访问 AppLocker 并创建条目
创建 AppLocker 条目是一个困难且容易出错的过程,因为这些条目分散在众多注册表键中,需要在注册表中递归搜索合适的位置来放置这些键。
1.1 递归搜索注册表的代码
private List < String > SearchReg(
RegistryKey StartHive, String StartPath,
String SearchKey, List < String > Results)
{
RegistryKey Start; // Defines a starting point for the search.
// This operation will fail when processing certain users.
try
{
// Open the specified registry key.
Start = StartHive.OpenSubKey(StartPath);
}
catch (SecurityException SE)
{
// The application can’t process this key.
return Results;
}
// Start may be null after an attempt to open some user keys.
if (Start ==
超级会员免费看
订阅专栏 解锁全文
2万+

被折叠的 条评论
为什么被折叠?



