EDN Admin
Well-known member
I have a much more involved version of this in a .WSF file that used to work and stopped, apparently after last weeks patches:
<pre class="prettyprint lang-vb <job id="TestXML.DOMDocument
<script language="VBScript
Option Explicit
Dim dom, node, root
Set dom = CreateObject("Msxml2.DOMDocument")
Create a processing instruction targeted for xml.
Set node = dom.createProcessingInstruction("xml", "version=1.0")
dom.appendChild node
Create a comment for the document.
Set node = dom.createComment("a test file")
dom.appendChild node
Create the root element.
Set root = dom.createElement("TestRoot")
dom.appendChild root
Create node with a date element.
Set node = dom.createElement("MyTestDate")
node.Text = Now()
root.appendChild node
Create node with a text element.
Set node = dom.createElement("MyTestText")
node.Text = "Some Text"
root.appendChild node
Save the XML document to a file.
dom.save "c:trythis"
</script>
</job> [/code]
Now it works right up to the dom.save; here msxml3.dll generates an 80070005 Access Is Denied error.
There is a huge search footprint for [msxml3 access denied]. I cant find any results that have to do with using MSXML from WSH via VBS--they all are somehow web page and/or IIS related.
An clues why this is suddenly broken and what to do about it would be appreciated greatly!
View the full article
<pre class="prettyprint lang-vb <job id="TestXML.DOMDocument
<script language="VBScript
Option Explicit
Dim dom, node, root
Set dom = CreateObject("Msxml2.DOMDocument")
Create a processing instruction targeted for xml.
Set node = dom.createProcessingInstruction("xml", "version=1.0")
dom.appendChild node
Create a comment for the document.
Set node = dom.createComment("a test file")
dom.appendChild node
Create the root element.
Set root = dom.createElement("TestRoot")
dom.appendChild root
Create node with a date element.
Set node = dom.createElement("MyTestDate")
node.Text = Now()
root.appendChild node
Create node with a text element.
Set node = dom.createElement("MyTestText")
node.Text = "Some Text"
root.appendChild node
Save the XML document to a file.
dom.save "c:trythis"
</script>
</job> [/code]
Now it works right up to the dom.save; here msxml3.dll generates an 80070005 Access Is Denied error.
There is a huge search footprint for [msxml3 access denied]. I cant find any results that have to do with using MSXML from WSH via VBS--they all are somehow web page and/or IIS related.
An clues why this is suddenly broken and what to do about it would be appreciated greatly!
View the full article