private static void Main(string[] args)
{
RegistryKey regKey = null;
try
{
//HKEY_CURRENT_USER\SOFTWARE\Microsoft\VisualStudio\14.0\Find
regKey = Registry.CurrentUser.OpenSubKey(@"SOFTWARE\Microsoft\VisualStudio\14.0\Find", true);
var filters = regKey.GetValueNames().Where(v => v.StartsWith("Filter"));
foreach (var filter in filters)
{
regKey.SetValue(filter, string.Empty);
}
}
catch (Exception ex)
{
Console.WriteLine("Registry clear for filter keys failed. {0}", ex.Message);
return;
}
}
{
RegistryKey regKey = null;
try
{
//HKEY_CURRENT_USER\SOFTWARE\Microsoft\VisualStudio\14.0\Find
regKey = Registry.CurrentUser.OpenSubKey(@"SOFTWARE\Microsoft\VisualStudio\14.0\Find", true);
var filters = regKey.GetValueNames().Where(v => v.StartsWith("Filter"));
foreach (var filter in filters)
{
regKey.SetValue(filter, string.Empty);
}
}
catch (Exception ex)
{
Console.WriteLine("Registry clear for filter keys failed. {0}", ex.Message);
return;
}
}
You can also just do it with this command:
ReplyDeletereg delete "HKEY_CURRENT_USER\Software\Microsoft\VisualStudio\14.0\Find" /v Filter /f