Microsoft Update: msxml3.dll: The parameter is incorrect

Disclaimer I have a VBS…

Login

Blog History

Disclaimer

I have a VBS script that calls:

' Create object
Set XmlDocument = WScript.CreateObject("Msxml2.DOMDocument.3.0") 
Set XslStylesheet = WScript.CreateObject("Msxml2.DOMDocument.3.0") 

' load xml doc and stylesheet into above objects

' attempt a transform
Result = XmlDocument.transformNode(XslStylesheet)

With the VBS code as above it throws this error when running cscript.exe as the scripting host:
msxml3.dll: The parameter is incorrect.

If running WScript.exe as the scripting host it includes the above error and an error number:
80070057

This error seems to be due to a Microsoft patch update that was applied last night.

I downloaded and installed MSXML 3 Service Pack 7 from Microsoft and then changed the code as below and the problem is solved. I am not sure if the updated MSXML package fixed it or simply the version change. So it's worth trying just the version change first.

Set XmlDocument = WScript.CreateObject("Msxml2.DOMDocument.5.0")  
Set XslStylesheet = WScript.CreateObject("Msxml2.DOMDocument.5.0")  

Note: You may need to check HKEY_CLASSES_ROOT in the registry to check if you have the correct Msxml2.DOMDocument.X.X values. Obviously the change you make to your code must match something you have on your system already. I mention this because I set the VBS to reference Msxml2.DOMDocument.4.0 on my workstation (and it worked fine) and then tried to run it on another workstation and it didn't have 4.0 hence the change to "Msxml2.DOMDocument.5.0"

HKEY_CLASSES_ROOT Registry Entries for MSXML

HKEY_CLASSES_ROOT Registry Entries for MSXML

0 Comments

Submit a Comment

Your email address will not be published. Required fields are marked *

This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

The reCAPTCHA verification period has expired. Please reload the page.