'ISMSI_HANDLE' and include "iswi.h"
Posted 06 March 2006 - 22:41
I need to use ISMSI_HANDLE for some MSI functions. I've included #include "isrt.h" in the script. However, I'm getting an error:
'ISMSI_HANDLE' unidentified identifier
In addition to this, I'm an getting error including "iswi.h" in my script. The error is:
"Can't open include file."
Does anyone know what project settings I need to get these items recognized in my script?
P.s. Can you believe all I tried to do this morning was use MSISetProperty?
Posted 07 March 2006 - 05:57
ISMSI_HANDLE is not supported in Basic MSI projects, and is not supported in InstallScript custom actions.
If you want ot use MSI Handle in InstallScript function you probably should use this.
|export prototype myFunction ( HWND );|
function myFunction ( hMSI )
MSISetProperty ( hMSI, "MY_PROPERTY", "MY_PROPERTY_VALUE" );
Posted 07 March 2006 - 17:01
Thanks for getting back to me.
I did see that same warning in the documentation; however it doesn't apply to me because I'm not doing an MSI project or a custom action. I'm simply trying to call this function from the install script.
I've seen in the documentation install script examples where they included iswi.h and used ISMSI_HANDLE.
I don't understand what my project is missing from that is preventing me from using these items.
As far as a custom action goes, I think this would be over kill for 3 lines of code.
Do you have any other ideas?
Posted 07 March 2006 - 19:23
Posted 07 March 2006 - 19:55
That being the case, how do I change the ProductVersion property in my installscript code?
Thanks for your help. I appreciate it.
Posted 08 March 2006 - 18:28
Posted 08 March 2006 - 20:09
I've been looking for a way to change this number in the installscript code to get it to work with our company's build script. I need to get my installation's 'productversion' to match what is generated during our daily build.
I thought I found this solution the other day when I discovered the MsiSetProperties method. That's what began my posts for the last 2 days.
Thanks to you I know that I can't use the Msi methods in an pure InstallScript project; however I was hoping there is another way to change this value in the script.
Thanks for your help,
Posted 09 March 2006 - 10:12
IFX_PRODUCT_VERSION = szYourVersion;
But you may also be able to set it at build time, using InstallShield's automation interface.
Posted 09 March 2006 - 17:46
Posted 09 March 2006 - 18:07
I just tried your suggestion (using "IFX_PRODUCT_VERSION = szYourVersion"). It worked perfectly. After all the time I spent this week on this problem, I can't believe how simple it was.
Thanks again for your help. I'll be looking into the automation a little bit more, because that looks exciting too.