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: Instantiating COM object (via InstallScript CreateObject() function call)) fails
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
May 02, 2012
06:56 AM
Instantiating COM object (via InstallScript CreateObject() function call)) fails
Hi guys,
I'm currently upgrading/porting our installer setup to a new platform update of our application which also includes upgrading from IS12 to IS 2012.
I made the conversion to the new IS 2012 version and made the required changes in the application setup structure (played along with components, etc.)
I was able to build me an installer kit of such an updated MSI setup and now I'm in the phase of actually running the installation of such a resulting kit and troubleshooting the installation process itself.
Now here comes my problem: I have serval InstallScript CustomActions that make use of MSXML component XML-DOM-Object.
The previous functional version of my MSI setup (that was running fine when built by IS12) contained the following code that was used to create a new DOM-XML object instance: set doc = CreateObject("Msxml2.DOMDocument.4.0");
As soon as the code runs this statement (observed while IScript-debugging) the current CA function is just bailed out - no error message, no exception (tried with try-catch blocks), no message in the installation log file - and causes a complete rollback (which is expected in case of serious problem experienced during an installation).
The thing is I simply don't know why the mentioned call fails > so I just dont know how to solve it.
I tried serveral things to remedy this (did not suceed, though):
- i tried other combinations of the COM app. (Msxml2.DOMDocument.6.0 ... or even the 'version independent' one - Msxml2.DOMDocument)
- i made me an external JScript that used the same approach to make a new instance of DOM-XML object (var dom = new ActiveXObject("msxml2.DOMDocument");) ... this one worked fine, so I presume this not a case of a missing/not configured COM MSXML component
- i swapped the parent CA from a deferred action to an immediate execute one... did not help
- i even tried instantiating a different COM object (set obj = CreateObject("WScript.Shell");) ... it misbehaved in the very same way - the function just finished there and failed
The bottom line: does anyone know why a call to CreateObject() could cause such an odd result? What am I doing wrong? Are the changes done to InstallShield 2011/2012 behind this?
I'm currently upgrading/porting our installer setup to a new platform update of our application which also includes upgrading from IS12 to IS 2012.
I made the conversion to the new IS 2012 version and made the required changes in the application setup structure (played along with components, etc.)
I was able to build me an installer kit of such an updated MSI setup and now I'm in the phase of actually running the installation of such a resulting kit and troubleshooting the installation process itself.
Now here comes my problem: I have serval InstallScript CustomActions that make use of MSXML component XML-DOM-Object.
The previous functional version of my MSI setup (that was running fine when built by IS12) contained the following code that was used to create a new DOM-XML object instance: set doc = CreateObject("Msxml2.DOMDocument.4.0");
As soon as the code runs this statement (observed while IScript-debugging) the current CA function is just bailed out - no error message, no exception (tried with try-catch blocks), no message in the installation log file - and causes a complete rollback (which is expected in case of serious problem experienced during an installation).
The thing is I simply don't know why the mentioned call fails > so I just dont know how to solve it.
I tried serveral things to remedy this (did not suceed, though):
- i tried other combinations of the COM app. (Msxml2.DOMDocument.6.0 ... or even the 'version independent' one - Msxml2.DOMDocument)
- i made me an external JScript that used the same approach to make a new instance of DOM-XML object (var dom = new ActiveXObject("msxml2.DOMDocument");) ... this one worked fine, so I presume this not a case of a missing/not configured COM MSXML component
- i swapped the parent CA from a deferred action to an immediate execute one... did not help
- i even tried instantiating a different COM object (set obj = CreateObject("WScript.Shell");) ... it misbehaved in the very same way - the function just finished there and failed
The bottom line: does anyone know why a call to CreateObject() could cause such an odd result? What am I doing wrong? Are the changes done to InstallShield 2011/2012 behind this?
(1) Reply
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
May 07, 2012
01:38 PM
We've tried CreateObject in a sample InstallScript project and in an InstallScript custom action in a sample Basic MSI project. In both cases the CreateObject call succeeds and returns a usable object (we tested with the Msxml2.DOMDocument.4.0 progid).
Is this issue occurring on any machine you test this project on? Can you reproduce this behavior on the same machines with a sample project?
Is this issue occurring on any machine you test this project on? Can you reproduce this behavior on the same machines with a sample project?