
sydb1.5524927780461853E12 asked a question.
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?
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?