Results 1 to 5 of 5

Thread: Accessing WI-properties from vbscript

  1. #1
    Join Date
    Feb 2002
    Location
    Erlangen, Germany
    Posts
    80

    Question Accessing WI-properties from vbscript

    Hi,

    it seems to me that under certain circumstances the access to Windows Installer properties from vbscript (in a custom action) does not work.

    I have a custom action which executes vbscript code that is stored in the custom action itself. I created a Message Box which shows me the value of the WI property but it is empty. The property has a value in the property manager and this value still lives after calling the vbscript. So it seems to me that the access to the property doesn't work :-(

    Any ideas?

    thanks,
    Carsten

  2. #2
    Join Date
    Feb 2002
    Location
    Erlangen, Germany
    Posts
    80

    Question

    I forgot: I'm accessing the WI property as follows:

    sName = Session.Property("SPXWEB_VDIR_NAME")

  3. #3
    Join Date
    Oct 2001
    Location
    Here and there
    Posts
    16,233
    One possible cause is that most MSI properties are unavailable during deferred execution; about which see InstallShield Knowledge Base articles Q106229 and Q104413 at http://support.installshield.com/kb.

  4. #4
    Join Date
    Feb 2002
    Location
    Erlangen, Germany
    Posts
    80
    Yes, you're right - thanks :-)

    But I do not exactly understand these knowledge base articles. Do they mean, that I can call MsiGetProperty directly from my vbscript?

    And how do I call it? How do I pass the MSI-Handle to MsiGetProperty in my VBScript?

    thanks,
    Carsten

  5. #5
    Join Date
    Oct 2001
    Location
    Here and there
    Posts
    16,233
    I don't think you can prototype APIs in VBScript, so you'll need to continue to use Session.Property; the Session object is the equivalent of the MSIHANDLE argument used in C/InstallScript code.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •