How to search with the Windows Shell?
An old proverb says: "Seek and ye shall find". Why we can not seek our own applications? :biggrin: Windows 7 provides the necessary API to search for it. To search API .NET code to be able to respond, is not really much needed. One only need to embed the Windows API code and pack in a few lines, the custom search client to be developed. What are people looking and, above all, where to look, every developer has to decide. The quality of the search depends largely on various criteria: It is looking pretty pointless for songs from their favorite band in the system folder of Windows. And pictures from the last office party you will not find in their music folders. Unless they have a very interesting organization style. For good reason, the API also offer the necessary configuration tools for the search. In what type of folder you want to search? What kind of data we are looking for? If all the search terms, or at least one search term can be found in the document? In the case of current data or created documents long ago? I think that some of you might have got what I wanted. Reply me soon. :notworthy
Re: How to search with the Windows Shell?
A separate search application is implemented very quickly. But only two libraries from the Windows API code packs are required:
Code:
private void start search (search string text)
{
/ / Create search terms
search search condition condition =
GetSearchCondition (search text);
/ / Date as a further refine by
search condition condition = date
SearchConditionFactory.CreateLeafCondition (
SystemProperties.System.Title,
search text,
SearchConditionOperation.ValueContains);
/ / Content of the search conditions
search condition final search condition =
SearchConditionFactory.CreateAndOrCondition (
SearchConditionType.Or,
false
search condition,
date condition);
/ / Create a shell SearchFolder
shell SearchFolder SearchFolder;
if (ShellLibrary.IsPlatformSupported)
{
SearchFolder shell = new search folder (
final search condition,
(Shell container) KnownFolders.DocumentsLibrary,
(Shell container) KnownFolders.PicturesLibrary,
(Shell container) KnownFolders.VideosLibrary);
}
else
{
SearchFolder shell = new search folder (
final search condition,
(Shell container) KnownFolders.Documents,
(Shell container) KnownFolders.Pictures,
(Shell container) KnownFolders.Videos);
}
/ / Data list the results indicate
_result.ItemsSource = search folder;
}
The method GetSearchCondition is implemented as follows:
private search condition GetSearchCondition (string text search)
{
/ / Search terms from the text form
string [] words = searchText.Split ('');
/ / The first search result is empty
search condition combinedPropertyCondition = null;
/ / Each word in the search text a search condition for generating
foreach (string word in words)
{
/ / First search condition -> Search by file name
search condition propertyCondition1 =
SearchConditionFactory.CreateLeafCondition (
SystemProperties.System.FileName,
word,
SearchConditionOperation.ValueContains);
/ / Second condition search -> search for keywords / tags in file
search condition propertyCondition2 =
SearchConditionFactory.CreateLeafCondition (
SystemProperties.System.Keywords,
word,
SearchConditionOperation.ValueContains);
/ / We want an OR condition for tags or file name
search condition tmpCombinedCondition =
SearchConditionFactory.CreateAndOrCondition (
SearchConditionType.Or,
false
propertyCondition1,
propertyCondition2);
/ If there already is a search condition,
/ / Linking the new and old that AND
if (combinedPropertyCondition! = null)
{
combinedPropertyCondition =
SearchConditionFactory.CreateAndOrCondition (
SearchConditionType.And,
false
combinedPropertyCondition,
tmpCombinedCondition);
}
else
{
combinedPropertyCondition = tmpCombinedCondition;
}
}
combinedPropertyCondition return;
}
The search itself is run from the shell class search folder. The definition of the search via the search conditions. Which folders to be searched is defined by using "know folders", so-called known folders.
SearchFolder shell = new search folder (
final search condition,
(Shell container) KnownFolders.DocumentsLibrary,
(Shell container) KnownFolders.PicturesLibrary,
(Shell container) KnownFolders.VideosLibrary);
The result can now visualize how you want. I have confined myself in this example is a simple list. In the Windows API code to pack is a full-fledged WPF visualization. :thumbup1:
Is my hardware and software compatible with Windows 7?
I am here to know about the compatibility about my hardware and software with the Windows 7. I have recently started using the Windows 7, so I am not having enough knowledge about the compatibility about the applications and hardware things. Are there any tools or applications by which we can know the details about the compatibility, i.e. whether software (or hardware) is compatible with the Windows 7 or not. So please provide some useful notes about it. More information about this topic would be really very appreciable.
Re: How to search with the Windows Shell?
The Windows 7 Upgrade Advisor scans your computer, all the hardware and software and offers tips on whether there are to be expected after an upgrade surprises. The Advisor has indeed still in beta status but works fine. Here is screenshot of my computer as the Vista partition), the system requirements are OK. Good (that's with Ultimate Extras are not (as I can get over it?)
However, I have to keep look-Packerln 3 software (no matter what is, for all existing Windows 7 versions). By comparison, on an old Compaq Presario (Pentium 3 with 512 MB RAM and mini-disk) does not have the hardware to the Advisor excited a storm of enthusiasm. No surprises, I advance a good idea if I can with existing software and hardware upgrade to Windows 7.
Re: How to search with the Windows Shell?
For companies or partners, it obviously makes little fun to review every single computer, because there is something smarter in the form of Solution Accelerators called Microsoft Assessment and Planning Toolkit. This makes agent-less take stock (of course much more than "just" Windows 7, because there's much more, such as App-V, Hyper-V, ...) and helps of course violently when switching costs to calculate. It also gets pretty Reports (Word and Excel). In connection with software compatibility, one should also complement the Microsoft Application Compatibility Toolkit 5.0. The Security Compliance Manager will help you plan, deploy, operate, and manage your baselines for the most widely used Microsoft technologies, including 7 Windows security baselines. The IT GRC Process Management Pack for System Center Service Manager and the IT Compliance Management Series are IT GRC solutions that integrate with the System Center platform. Implementing these end-to-end solutions with System Center will enable organizations to meet their compliance and regulatory commitments to in efficient and reliable manner.