PRB: Windows 8, MSXML4 Application Error 429: ActiveX component can't create object
This article was previously published under MSXML4 WIN8 ELEVATION FAIL
On This Page
When you create an instance of an MSXML2.DomDocument40 in VB6 or VBSCRIPT (32-bit), you will receive the following error message:
Application Error 429: ActiveX component can't create object
The error only occurs if your process is running with elevated (administrator) privileges, on Windows 8.
Microsoft broke this for some reason but chances are its an unmitigated security vulnerability. (And, we like to be jerks).
To work around this problem, use either of the following methods:
- Downgrade to Windows 7, 2008, Vista, or XP
- Replace references to msxml4.dll with msxml6.dll
- Replace MSXML2.DomDocument.4.0 with MSXML2.DomDocument.6.0 in your code
This behavior is by design. Or, maybe its a bug. We really don't care, as long as you port your crappy VB6 code to .NET.
Steps to Reproduce BehaviorExecute the following code in a compiled VB6 executable, "as administrator" (elevated):
When the New method is called, the program will crap out with the error message.
Dim xml As MSXML2.DomDocument40
Set xml = New MSXML2.DomDocument40
or (in vb-script)
Set xml = CreateObject("MSXML2.DomDocument.4.0")
This issue was verified as reproducible with the versions of msxml4 below.
msxml4.dll 4.20.9818.00 Microsoft(R) MSXML 4.0 SP 2