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

VBScript Property Passing sequence


1 reply to this topic

BobRouse

BobRouse
  • Members
  • 82 posts

Posted 03 May 2001 - 21:00

I want to make some variables available to a VB script, run the VB Script, have the VBScript set some values, then access the changes the VBScript made. I want to make sure I am going about this the right way before I invest too much more time into it. My plan is:

1) Use MsiSetProperty() to create a property for the VBScript to access (using a variable to supply the value)
2) Within the VBSCript, use Session.Property() to get the value
3) Within the VBScript, use Session.Property() to set the new value
4) Back in the InstallShield script, use MsiGetProperty() to extract the value to a variable.
Am I on the right track here?
Also:
A) All of the Msixxxxxx functions use the installation handle "hInstall", but I can't seem to find how to create this handle. What function do I call to set the handle to the current installation so I can call the MsiGetProperty(), etc...?
B) Can I create properties "ad-hoc", or do they need to be added to the "property table" at design time? If they need to be setup ahead of time, how do I add them to the property table?

Thanks,


Leigh Ravenhall

Leigh Ravenhall
  • Members
  • 269 posts

Posted 04 May 2001 - 04:32

When you create an Installscript custom action, the installscript function must take a handle as a parameter.  This handle is a handle to the installer.  For example:
export prototype myFunc(HWND);
function myFunc(hMSI)
begin....

For this function, hMSI is a handle to the current installation.

You can create properties ad hoc.  (I think)