API MsiQueryProductState无法按预期工作 [英] API MsiQueryProductState does not work as expected

查看:83
本文介绍了API MsiQueryProductState无法按预期工作的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

您好,


我们已经开发了一个工具,可以使用API​​ MsiQueryProductState读取已安装产品的状态。


INSTALLSTATE eInstallState;

eInstallState = MsiQueryProductState(szProductString);


其中,szProductString表示已安装软件的产品代码。


对于已安装的产品,在Windows 7 64位计算机系统上,API返回5即INSTALLSTATE_DEFAULT。但是对于相同的已安装产品,只有1个Windows 7 64位计算机系统,API MsiQueryProductState返回1.


我们想知道API MsiQueryProductState是否有可能返回1产品已安装。如果是,是否有可用于检查已安装产品的替代API?

解决方案

您好咨询绿色


此论坛正在讨论Visual Studio WPF / SL Designer,Visual Studio Guidance Automation Toolkit,开发人员文档和帮助系统和Visual Studio编辑器。


您的问题可能与C ++开发有关我会将此主题移至相应的论坛以获得专业答案。


此致


<跨度>的奥斯卡


Hi,

We have developed a tool which reads status of installed product using API MsiQueryProductState.

INSTALLSTATE eInstallState;
eInstallState = MsiQueryProductState(szProductString);

Where, szProductString represents product code of installed software.

For installed product, on Windows 7 64-bit computer systems, API returns 5 i.e. INSTALLSTATE_DEFAULT. But on only 1 Windows 7 64-bit computer system for the same installed product, API MsiQueryProductState returns 1.

We would like to know if there is any possibility that API MsiQueryProductState returns 1 even for the product is installed. If yes, is there any alternative API which can be used to check installed product?

解决方案

Hi Consult Green,

This forum is discussing Visual Studio WPF/SL Designer, Visual Studio Guidance Automation Toolkit, Developer Documentation and Help System, and Visual Studio Editor.

Your issue may be related to C++ development I will move this thread to corresponding forum for a professional answer.

Sincerely,

Oscar


这篇关于API MsiQueryProductState无法按预期工作的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆