Has anyone successfully executed functions from msi.dll in LotusScript under x64?

Could someone please verify the results I’m getting and/or let me know if there is a solution to this problem?

I’ve been trying for some time now to use MSIQueryProductState when triggered to run under x64 Domino and always get an error. The same code works fine if triggered under the 32-bit Notes client running on the same x64 machine, but always fails when run by the x64 Server.

I get the error:

“External function not found”

when using the declaration:

Declare Function MsiQueryProductState Lib “Msi.dll” Alias “MsiQueryProductStateA” (Byval lpBuffer As String) As Long

I get a different error if I try to force the script to use the x64 dll:

“Error in loading DLL”

using the declaration:

Declare Function MsiQueryProductState Lib “c:\windows\sysWOW64\Msi.dll” Alias “MsiQueryProductStateA” (Byval lpBuffer As String) As Long

Here’s some sample calling script:

If ( MsiQueryProductState (“{7299052b-02a4-4627-81f2-1818da5d550d}”) <> 5) Then

szRegCheck = ""    'not found

Else

szRegCheck = "DETECTED AS INSTALLED"		

End If

Any help would be appreciated!!!

Subject: something to try

It could be that the user Domino is running under on the 64-bit system doesn’t have rights to the directory with the DLL. You can call GetsystemWow64Directory, then try opening that programmatically and see if you get an error. If you can get that far you should have the proper permissions.

I’ll have to set up a test 64-bit server with Domino in order to go any further with LotusScript, which is going to take me a while.