cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Alex_-_AQA
Level 3

Working with IS 2008 via COM: Exception when opening a project

Hello,

We are trying to work with InstallShield 2008 via COM with VBScript in our product. For example:

Set isw = CreateObject( "IswiAuto14.ISWiProject" )
isw.OpenProject "C:\My Projects\Proj.ism"

When the OpenProject method is called, an exception occurs in the IS COM server and our application crashes because of the exception.
Are the IS developers aware of this problem and are there any plans to fix it in an update?

Thanks in advance for any relevant information,
Alex
Labels (1)
0 Kudos
(13) Replies
RobertDickau
Flexera Alumni

What is the exception? I'm not aware of that being a common issue...
0 Kudos
Alex_-_AQA
Level 3

Hello Robert,

Thanks for the reply. Here is information on the exception:

Unhandled exception at 0x6a6a25db in bug20077341593421.dmp: 0xC0000095: Integer overflow.

> ISUIServices_libFNP.dll!6a6a25db()
[Frames below may be incorrect and/or missing, no symbols loaded for ISUIServices_libFNP.dll]
advapi32.dll!_CloseServiceHandle@4() + 0x2f bytes
kernel32.dll!_LoadLibraryExW@12() + 0x11c bytes
kernel32.dll!_GetProcAddress@8() + 0x3f bytes

Does this help to identify the problem?

Thanks,
Alex
0 Kudos
RobertDickau
Flexera Alumni

As a sanity check, is InstallShield 2008 activated on that system?

Anything tricky about your application or system setup? Are you launching the VBScript directly by double-clicking or through cscript.exe, or some other way?
0 Kudos
Alex_-_AQA
Level 3

Hello Robert,

Actually, the problem occurs on a customer's machine. I will ask the customer to provide the needed information.

Are you launching the VBScript directly by double-clicking or through cscript.exe, or some other way?

We are using Microsoft Script Engine directly from our product. The product is an automated build system that allows writing scripts in it.
I can give you a link to the trial version if this helps.

Best Regards,
Alex
0 Kudos
erenken
Level 3

Yes InstallShield 2008 is activated on my system where this happens. I belive AutomatedQA was also able to reproduce this problem on their machine with an trial version of the InstallShield 2008.
0 Kudos
hidenori
Level 17

Could you import the registry file attached in this post, and then run your automation code? The registry entry enables to create the InstallShield verbose log file named "InstallShield.log" under the C:\Program Files\Macrovision\IS 2008\System folder. Could you post the log file so that we can find any information related to the exception?
0 Kudos
ambark
Level 3

I too am getting a crash in my C++ code when it reaches the OpenProject call. Here is the code I am using:

#import "C:\Program Files\Macrovision\IS2008\System\ISWiAutomation14.dll" no_namespace


int APIENTRY _tWinMain(HINSTANCE hInstance,
HINSTANCE hPrevInstance,
LPTSTR lpCmdLine,
int nCmdShow)
{
if(lpCmdLine == NULL || _tcslen(lpCmdLine) <= 0)
{
// Project path not specified! Nothing to do.
return -1;
}

// Initialize COM
HRESULT hr = CoInitialize(NULL);
if (FAILED(hr))
{
// Couldn't initialize COM!
return hr;
}

try {
// Open the project in read-write mode
_ISWiProjectPtr oISM(__uuidof(ISWiProject));
oISM->OpenProject(lpCmdLine, VARIANT_FALSE);

// Get the product version
_bstr_t sVersion = oISM->GetProductVersion();
MessageBoxA(NULL, sVersion, "Product Version:", MB_OK);

// Save the changes and close the project
//oISM->SaveProject();
oISM->CloseProject();
}
catch(_com_error e)
{
// handle exceptions
MessageBoxA(NULL, (const char*)(e.Description()), "*** Exception: ", MB_OK);
}

CoUninitialize();
return 0;
}
0 Kudos
hidenori
Level 17

Are you able to open the project using VBScript? There is a sample code in http://helpnet.installshield.com/Robo/BIN/Robo.dll?tpc=/robo/projects/installshield14helplib/ihelpautoiswiproject.htm. If it works, make sure that you pass a valid project path to the OpenProject() method in your C++ code.
0 Kudos
ambark
Level 3

The VBScript code works and I made sure that the project path supplied to OpenProject is correct.

I did another quick test. I have IS 11 installed on this system too and I modified the code to use IS 11 automation and gave a sample IS 11 .ISM file to open and it worked fine. Thne I convereted that sample .ISM file to IS 14 format and reverted me changes so as to use IS 14 automation DLL and the exact same code crashes on OpenProject once again!

So there is something definitely going on with the automation and C++. Any clues?
0 Kudos
hidenori
Level 17

You probably need to delete the .tlh file manually and rebuild your project.
0 Kudos
ambark
Level 3

No - that did not work. Anything else I can try? It is clearly something with the IS 14 automation server DLL since the code works fine with IS 11 automation server DLL.
0 Kudos
hidenori
Level 17

I tested your C++ code on my side, and it worked with the IS 2008 automation. Could you test it on a clean machine with only the IS 2008 IDE installed?

Thank you for your patience and cooperation.
0 Kudos
erenken
Level 3

hidenori wrote:
Could you import the registry file attached in this post, and then run your automation code? The registry entry enables to create the InstallShield verbose log file named "InstallShield.log" under the C:\Program Files\Macrovision\IS 2008\System folder. Could you post the log file so that we can find any information related to the exception?


Here is my log file, you just want the data from today. I am running this now on Windows Vista x64. I am running Automated Build Studio as an administrator with elevated privilaiges.
0 Kudos