This website uses cookies. By clicking Accept, you consent to the use of cookies. Click Here to learn more about how we use cookies.
Turn on suggestions
Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.
- Revenera Community
- :
- InstallShield
- :
- InstallShield Forum
- :
- Re: Working with IS 2008 via COM: Exception when opening a project
Subscribe
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Subscribe
- Mute
- Printer Friendly Page
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Jul 20, 2007
01:04 PM
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
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
(13) Replies
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Jul 20, 2007
05:34 PM
What is the exception? I'm not aware of that being a common issue...
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Jul 23, 2007
05:33 AM
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
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
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Jul 24, 2007
05:19 PM
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?
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?
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Jul 25, 2007
10:54 AM
Hello Robert,
Actually, the problem occurs on a customer's machine. I will ask the customer to provide the needed information.
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
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
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Jul 25, 2007
11:15 AM
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.
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Jul 25, 2007
01:53 PM
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?
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Jan 02, 2008
02:05 PM
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;
}
#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;
}
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Jan 02, 2008
02:37 PM
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.
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Jan 02, 2008
03:24 PM
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?
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?
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Jan 02, 2008
04:47 PM
You probably need to delete the .tlh file manually and rebuild your project.
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Jan 03, 2008
05:59 AM
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.
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Jan 03, 2008
12:33 PM
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.
Thank you for your patience and cooperation.
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Jan 16, 2008
04:13 PM
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.
![](/skins/images/3B39CE851FDD5528C393F146EB70A2D0/responsive_peak/images/icon_anonymous_message.png)