Article ID: 974653 - Last Review: July 1, 2010 - Revision: 2.0 How to programmatically check for the presence of a Windows Installer-based product by using its product code
On This PageINTRODUCTION
Windows Installer provides APIs that let a user query the Windows Installer database for the presence of a particular product. Each product is uniquely identified by its product code, which is a GUID.
This article provides code samples that show how to programmatically check for the presence of a Windows Installer-based product by using its product code.
MORE INFORMATIONCall the API from Visual C++The following is an example of how you can call the MsiGetProductInfoExW() method in Visual C++ to detect the presence of a specific product. The product is specified by its unique product code GUID.Call the API from VBScriptThe following is an example of how you can call the ProductInfo() method on the WindowsInstaller.Installer object in Microsoft Visual Basic Script to detect the presence of a specific product. The product is specified by its unique product code GUID.Note The ProductCode property that is passed to the functions in both examples here include braces ({ }) inside the quotation marks. For more information about Windows Installer, visit the following Microsoft Windows Installer MSDN Web page: http://msdn.microsoft.com/en-us/library/aa367449(VS.85).aspx
(http://msdn.microsoft.com/en-us/library/aa367449(VS.85).aspx)
For more information about how to obtain the latest version of Windows Installer for your computer, visit the following Microsoft Web page:
http://www.microsoft.com/downloads/details.aspx?familyid=5A58B56F-60B6-4412-95B9-54D056D6F9F4&displaylang=en
(http://www.microsoft.com/downloads/details.aspx?familyid=5A58B56F-60B6-4412-95B9-54D056D6F9F4&displaylang=en)
For more information, visit the following Microsoft Web pages:
Note This is a "FAST PUBLISH" article created directly from within the Microsoft support organization. The information contained herein is provided as-is in response to emerging issues. As a result of the speed in making it available, the materials may include typographical errors and may be revised at any time without notice. See Terms of Use
(http://go.microsoft.com/fwlink/?LinkId=151500)
for other considerations. | Other Resources Other Support Sites
CommunityArticle Translations |






Windows Live
Facebook
Twitter
Linkedin
Digg it
Yahoo
Delicious
StumbleUpon
Yammer
Reddit
Technorati
FriendFeed
Email
Back to the top