com - MSXML4.0 on Windows Server 2008r2 - Cannot create object MSXML2.ServerXMLHTTP.4.0 -


we have large codebase (primarily vbscript) migrating windows 2000 (32 bit) server windows 2008 r2 (64 bit). portion of code relies on msxml 4.0 parser , unfortunately, not have option of using version 3 or 6 (for reasons beyond scope of question).

i've installed 4.0 version of msxml per instructions @ http://www.microsoft.com/en-us/download/details.aspx?id=15697 , verified installed correctly. "msxml4.dll" exists in "c:\windows\syswow64" , there key in registry @ hkey_classes_root\msxml2.serverxmlhttp.4.0 . ran regsrv32.exe against dll , said registered correctly.

however, when trying do

    set objasp = createobject("msxml2.serverxmlhttp.4.0") 

it fails with:

    script: c:\test.vbs     line:   1     char:   1     error:  activex component can't create object: 'msxml2.serverxmlhttp.4.0'     code:   800a01ad     source:     microsoft vbscript runtime error 

and in powershell:

     $objasp = new-object -comobject msxml2.serverxmlhttp.4.0 

it fails with:

    new-object : retrieving com class factory component clsid {88d969c6-     f192-11d4-a65f-0040963251e5} failed due following error: 80040154 class not        registered (exception hresult: 0x80040154 (regdb_e_classnotreg)).     @ line:1 char:11     + $objasp = new-object -comobject msxml2.serverxmlhttp.4.0     +           ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~     + categoryinfo          : resourceunavailable: (:) [new-object], comexception     + fullyqualifiederrorid :       nocomclassidentified,microsoft.powershell.commands.newobjectcommand 

thanks in advance.

i think you're running 64-bit versions of cscript , powershell default, msxml 32-bit component.

here link explain how start 32-bit version of powershell on 64-bit os: starting 32-bit version of windows powershell


Comments

Popular posts from this blog

linux - xterm copying to CLIPBOARD using copy-selection causes automatic updating of CLIPBOARD upon mouse selection -

c++ - qgraphicsview horizontal scrolling always has a vertical delta -