2

IUpdateSearcher インターフェイスの search メソッドの WUA API で Windows Update を取得しようとしていました。

「IsInstalled=1 or IsPresent=1」として渡した検索条件。以下はサンプルコードです。

IUpdateSearcher* searcher;
ISearchResult* results;
/*
.
.
Code to initialize COM and get UpdateSearcher*/
.
.
*/

hRes = searcher->Search("IsInstalled=1 or IsPresent=1", &results);

MSDN で IsInstalled と IsPresent の定義を確認しました (参照用にコピーされています)。どちらも似たようなことを言っています。

IsPresent   
When set to 1, finds updates that are present on a computer.
"IsPresent=1" finds updates that are present on a destination computer. If the update
is valid for one or more products, the update is considered present if it is installed
for one or more of the products."IsPresent=0" finds updates that are not installed 
for any product on a destination   computer.

IsInstalled
Finds updates that are installed on the destination computer.
"IsInstalled=1" finds updates that are installed on the destination computer.
"IsInstalled=0" finds updates that are not installed on the destination computer.

誰かが正確に何が違うのかを明確にしてもらえますか?

4

1 に答える 1