Jump to content


This is a ready-only archive of the InstallSite Forum. You cannot post any new content here. / Dies ist ein Archiv des InstallSite Forums. Hier können keine neuen Beiträge veröffentlicht werden.
Photo

handle for 1st parameter in MsiSetProperty


5 replies to this topic

halciber

halciber
  • Full Members
  • 25 posts

Posted 06 March 2006 - 18:37

Hi Everyone,

The first parameter of the MsiSetProperty function calls for a handle to the installer. Where or how can I get this in my install script code?

I'm using DevStudio 9, if it matters.

Thanks in advance.

Sincerely,
Mike Goldweber

Glytzhkof

Glytzhkof
  • Moderators
  • 1,447 posts

Posted 06 March 2006 - 18:56

C++ or Installscript?

Installscript:
export prototype test (HWND);

function test ( oneMSIDB)
//
begin
MsiSetProperty ( oneMSIDB, "PROPERTY", "1");
end;

Regards
-Stein Åsmul

halciber

halciber
  • Full Members
  • 25 posts

Posted 06 March 2006 - 20:29

Hi Glytzhkof,

Thanks for getting back to me so quickly. I got the part you listed. I'm using Installscript, btw.

What I don't know is where you are initially getting the handle. So to use your example,

//test(HWND) defined in previous post

HWND myhandle;

myhandle = ?????;//what goes here?

test(myhandle);


It is what goes into the question mark that I don't understand. Do you know?

Thanks again,
Mike

halciber

halciber
  • Full Members
  • 25 posts

Posted 06 March 2006 - 21:11

Hi again,

I just found the function GetWindowHandle(flag). Is this the function the handle that I'm looking for?

//-------------------------------------------------------
//please see the previous posts
HWND myhandle;

myhandle = GetWindowHandle(HWND_INSTALL);

MsiSetProperty(myhandle, ...., ....);

//--------------------------------------------------------

Thanks again,
Mike

halciber

halciber
  • Full Members
  • 25 posts

Posted 06 March 2006 - 22:32

Ok, I think I found my answer. It looks like the handle I need is: ISMSI_HANDLE.

Mike Goldweber



Glytzhkof

Glytzhkof
  • Moderators
  • 1,447 posts

Posted 07 March 2006 - 17:29

As far as I recall I include the base Installshield runtime and then this handle is implicit in a BasicMSI project:

#include "ifx.h"

possibly also"

#include "isrt.h"

Regards
-Stein Åsmul