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
SYMPTOMS
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.
CAUSE
Microsoft broke this for some reason but chances are its an unmitigated security vulnerability. (And, we like to be jerks).
RESOLUTION
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
STATUS
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.
MORE INFORMATION
Steps to Reproduce Behavior
Execute the following code in a compiled VB6 executable, "as administrator" (elevated):
Dim xml As MSXML2.DomDocument40
Set xml = New MSXML2.DomDocument40or (in vb-script)
Dim xml
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
Replace references to msxml4.dll with msxml6.dll
ReplyDeletehave tired this solution but i am getting some other issues.
any help ??
Are you getting an error message creating an instance of the msxml6 object? If so, what is the error? I would also check that you have the right versions of MSXML 6.0 installed on your platform. For Windows 7, for example, the versions I have are -
ReplyDeletemsxml6.dll 6.30.7601.179 Microsoft(R) MSXML 6.0 SP3
msxml6r.dll 6.30.7600.163 Microsoft(R) MSXML 6.0
On my windows 8 workstation here are the versions
ReplyDeletemsxml6.dll 6.30.9200.164 Microsoft XML Core Services
msxml6r.dll 6.30.9200.164 Microsoft XML Core Services
run syswow64\cmd.exe as administrator and register them with regsvr32 msxml6.dll .. should fix you right up
on my windows 8 Pro i found the versions of
ReplyDeletemsxml6.dll 6.30.9200.16384 Microsoft XML Core Services
msxml6r.dll 6.30.9200.16384 Microsoft XML Core Services
i registered msxml6.dll by cmd.exe as administrator
but i couldn't register msxml6r.dll .
its failing to register : the error is
The module "C:\Windows\SysWOW64\msxml6r.dll" was loaded but the entry-point DllRegisterServer was not found.
Make sure that "C:\Windows\SysWOW64\msxml6r.dll" is a valid DLL or OCX file and then try again.
please any help ??
Replace references to msxml4.dll with msxml6.dll
ReplyDeletefor this solution i unregistered msxml4.dll and registered msxml6.dll
from cmd.exe as administrator
After this when i try to open my application , i am getting the error
" the error was encountered when loading the database"
after this i will get error saying "activex component cant create object "
so i registered again msxml4.dll then it works fine
i couldn't find the msxml6r.dll 6.30.9200.16384 Microsoft XML Core Services in msdn sites
ReplyDeleteso please specify the link where i can get this msxml6r.dll
i cant run vb.net application under admin rights on windows 8 pro 64bit .
ReplyDeletebut it works fine with non admin rights .
when i open application with admin rights it just start the process then suddenly stop
any help please ??
Hello.. a couple of things..
ReplyDeletemsxml6r does not need to be registered, only the msxml6.dll is registered. After changing your references in the code you need to create the object with the new object name CreateObject("MSXML2.DomDocument.6.0") otherwise you're still trying to create the old object. Finally all of the stuff on this page pertains to the 32-bit msxml dll. Under 64-bit you're on your own.
I recommend creating a simple xml6test.vbs with the following statements
Dim xml
Set xml = CreateObject("MSXML2.DomDocument.6.0")
and see what happens.
Then elevate your command prompt and try it again.
Thanks.
on windows 8 pro i just enabled the Administrator(super admin account)
ReplyDeletewhich is disabled by default .
Login to this acount and then i installed my software its working with no issues .
All the above issue which mentioned got solved .
i was doing the mistake here is .. i just installed my software by logging into local administrator account which doesn't have super admin previledge.
thanks
Sweet! Fixed by VB6 code under Windows 8
ReplyDeleteThanks Ron! Solved my problem.
ReplyDeleteVB6 app using XML 4 got the 429 error under Win8 when NOT running as admin (the app's manifest specifically says to run "asInvoker").
Upgraded to MSXML 6 and it works again under Win8 and still works under WinXP and Win7.
Thanks again!
[P.S. Tried to publish as WordPress but even after logging on, I get "You do not own that profile."]
I'm happy to see my rants are helpful :)
ReplyDelete