This website uses cookies. By clicking Accept, you consent to the use of cookies. Click Here to learn more about how we use cookies.
Turn on suggestions
Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.
- Revenera Community
- :
- InstallShield
- :
- InstallShield Forum
- :
- Using MsiQueryProductStateA - INSTALLSTATE undefined identifier
Subscribe
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Subscribe
- Mute
- Printer Friendly Page
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Apr 02, 2008
07:18 PM
Using MsiQueryProductStateA - INSTALLSTATE undefined identifier
I apologize for this probably newbie question, but I'm trying to get my InstallScript to recognize the variable "INSTALLSTATE_DEFAULT", which is an INSTALLSTATE. The text for INSTALLSTATE_DEFAULT does turn blue, which I would think means that it's a recognized define/variable.
I'm checking the value that is being returned after calling MsiQueryProductStateA before attempting to install a redistributable (vcredist_x86.exe) and if it is anything but INSTALLSTATE_DEFAULT, I want to install the redistributable. However, when compiling, INSTALLSTATE_DEFAULT is coming back as an undefined identifier.
I know the underlying value is 5, but I'd prefer to use the actual variable define instead of the number 5.
Do I need to include some extra header or prototype the INSTALLSTATE variable somehow?
Thank you very much in advance for any help.
Greg R
I'm checking the value that is being returned after calling MsiQueryProductStateA before attempting to install a redistributable (vcredist_x86.exe) and if it is anything but INSTALLSTATE_DEFAULT, I want to install the redistributable. However, when compiling, INSTALLSTATE_DEFAULT is coming back as an undefined identifier.
I know the underlying value is 5, but I'd prefer to use the actual variable define instead of the number 5.
Do I need to include some extra header or prototype the INSTALLSTATE variable somehow?
Thank you very much in advance for any help.
Greg R
(2) Replies
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Apr 03, 2008
08:38 AM
If it's not already being #include-d, perhaps #include "ISMsiQuery.h"?
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Apr 03, 2008
12:44 PM
Hi Robert, thank you for your help. I had previously tried including "ISMsiQuery.h" but I was also getting errors that it cannot open the file. I am currently including "ifx.h" without any directories specified in front of it. So what I did is search for "ifx.h" and found that it is located in the following two spots:
Scripts\iswi\Include
Scripts\Ifx\Include
It looks like it's by default includes start in the Source\Ifx\Include directory so I'm now doing the following include and it compiles fine:
#include "..\..\iswi\Include\ISMsiQuery.h"
I don't know if that's what I was intended to do but it appears to work.
Scripts\iswi\Include
Scripts\Ifx\Include
It looks like it's by default includes start in the Source\Ifx\Include directory so I'm now doing the following include and it compiles fine:
#include "..\..\iswi\Include\ISMsiQuery.h"
I don't know if that's what I was intended to do but it appears to work.
![](/skins/images/7674467D6278680F3FD526C8217C9173/responsive_peak/images/icon_anonymous_message.png)