I am trying to execute a script using cscript in my driver and I'm
having some trouble with it.

Here is the rule from the OTP on the subscriber channel:
---------------------------------------------------------------
<rule>
<description>Build Command For Create Home Directories</description>
<conditions>
<and>
<if-operation op="equal">add</if-operation>
<if-op-attr name="homeDirectory" op="available"/>
</and>
</conditions>
<actions>
<do-append-xml-element expression="." name="exec"/>
<do-set-xml-attr expression="./exec[last()]" name="cmd">
<arg-string>
<token-text xml:space="preserve">cscript.exe </token-text>
<token-global-variable name="gcvHomeDirVBS"/>
<token-text xml:space="preserve"> </token-text>
<token-src-name/>
<token-text xml:space="preserve"> </token-text>
<token-op-attr name="homeDirectory"/>
<token-text xml:space="preserve"> add</token-text>
</arg-string>
</do-set-xml-attr>
<do-append-xml-element disabled="true" expression="." name="exec"/>
<do-set-xml-attr disabled="true" expression="./exec[last()]"
name="cmd">
<arg-string>
<token-text xml:space="preserve">xcacls </token-text>
<token-op-attr name="ADHomeDirectory"/>
<token-text xml:space="preserve"> /g administrators:f /p
TEST\</token-text>
<token-src-name/>
<token-text xml:space="preserve">:C /T /Y</token-text>
</arg-string>
</do-set-xml-attr>
</actions>
</rule>

--------------------------------------------------
so when I trigger this rule... from the trace it shows...

***************************************
15:46:37 9A3F8BA0 Drvrs: AD FS Driver ST:Applying policy: Process
HomeDirectory Policy.
15:46:37 9A3F8BA0 Drvrs: AD FS Driver ST: Applying to add #1.
15:46:37 9A3F8BA0 Drvrs: AD FS Driver ST: Evaluating selection criteria
for rule 'Build Command For Create Home Directories'.
15:46:37 9A3F8BA0 Drvrs: AD FS Driver ST: (if-operation equal "add") =
TRUE.
15:46:37 9A3F8BA0 Drvrs: AD FS Driver ST: (if-op-attr 'homeDirectory'
available) = TRUE.
15:46:37 9A3F8BA0 Drvrs: AD FS Driver ST: Rule selected.
15:46:37 9A3F8BA0 Drvrs: AD FS Driver ST: Applying rule 'Build Command
For Create Home Directories'.
15:46:37 9A3F8BA0 Drvrs: AD FS Driver ST: Action:
do-append-xml-element("exec",".").
15:46:37 9A3F8BA0 Drvrs: AD FS Driver ST: Action:
do-set-xml-attr("cmd","./exec[last()]","cscript.exe
"+token-global-variable("gcvHomeDirVBS")+" "+token-src-name()+"
"+token-op-attr("homeDirectory")+" add").
15:46:37 9A3F8BA0 Drvrs: AD FS Driver ST: arg-string("cscript.exe
"+token-global-variable("gcvHomeDirVBS")+" "+token-src-name()+"
"+token-op-attr("homeDirectory")+" add")
15:46:37 9A3F8BA0 Drvrs: AD FS Driver ST: token-text("cscript.exe ")
15:46:37 9A3F8BA0 Drvrs: AD FS Driver ST:
token-global-variable("gcvHomeDirVBS")
15:46:37 9A3F8BA0 Drvrs: AD FS Driver ST: Token Value:
"C:\Novell\RemoteLoader\remoteCMDExec.vbs".
15:46:37 9A3F8BA0 Drvrs: AD FS Driver ST: token-text(" ")
15:46:37 9A3F8BA0 Drvrs: AD FS Driver ST: token-src-name()
15:46:37 9A3F8BA0 Drvrs: AD FS Driver ST: Token Value: "001".
15:46:37 9A3F8BA0 Drvrs: AD FS Driver ST: token-text(" ")
15:46:37 9A3F8BA0 Drvrs: AD FS Driver ST:
token-op-attr("homeDirectory")
15:46:37 9A3F8BA0 Drvrs: AD FS Driver ST: Token Value: "c:\home\001".
15:46:37 9A3F8BA0 Drvrs: AD FS Driver ST: token-text(" add")
15:46:37 9A3F8BA0 Drvrs: AD FS Driver ST: Arg Value: "cscript.exe
C:\Novell\RemoteLoader\remoteCMDExec.vbs 001 c:\home\001 add".
15:46:37 9A3F8BA0 Drvrs: AD FS Driver ST: Evaluating selection criteria
for rule 'Build Command for Deleting home directories'.
15:46:37 9A3F8BA0 Drvrs: AD FS Driver ST: (if-op-attr 'ADHomeDirectory'
changing) = FALSE.
15:46:37 9A3F8BA0 Drvrs: AD FS Driver ST: Rule rejected.
15:46:37 9A3F8BA0 Drvrs: AD FS Driver ST:Policy returned:
15:46:37 9A3F8BA0 Drvrs: AD FS Driver ST:
<nds dtdversion="3.5" ndsversion="8.x">
<source>
<product version="3.6.0.4294">DirXML</product>
<contact>Novell, Inc.</contact>
</source>
<input>
<add class-name="user" event-id="oes2-idvault#20090220204637#1#1"
qualified-src-dn="O=idvault\OU=users\CN=001"
src-dn="\IDVAULT\idvault\users\001" src-entry-id="33257">
<add-attr attr-name="homeDirectory">
<value timestamp="1235162797#1" type="string">c:\home\001</value>
</add-attr>
<exec cmd="cscript.exe C:\Novell\RemoteLoader\remoteCMDExec.vbs 001
c:\home\001 add"/>
</add>
</input>
</nds>
15:46:37 9A3F8BA0 Drvrs: AD FS Driver ST:Submitting document to
subscriber shim:
15:46:37 9A3F8BA0 Drvrs: AD FS Driver ST:
<nds dtdversion="3.5" ndsversion="8.x">
<source>
<product version="3.6.0.4294">DirXML</product>
<contact>Novell, Inc.</contact>
</source>
<input>
<add class-name="user" event-id="oes2-idvault#20090220204637#1#1"
qualified-src-dn="O=idvault\OU=users\CN=001"
src-dn="\IDVAULT\idvault\users\001" src-entry-id="33257">
<add-attr attr-name="homeDirectory">
<value timestamp="1235162797#1" type="string">c:\home\001</value>
</add-attr>
<exec cmd="cscript.exe C:\Novell\RemoteLoader\remoteCMDExec.vbs 001
c:\home\001 add"/>
</add>
</input>
</nds>
15:46:37 9A3F8BA0 Drvrs: AD FS Driver ST:Remote Interface Driver:
Sending...
15:46:37 9A3F8BA0 Drvrs: AD FS Driver ST:
<nds dtdversion="3.5" ndsversion="8.x">
<source>
<product version="3.6.0.4294">DirXML</product>
<contact>Novell, Inc.</contact>
</source>
<input>
<add class-name="user" event-id="oes2-idvault#20090220204637#1#1"
qualified-src-dn="O=idvault\OU=users\CN=001"
src-dn="\IDVAULT\idvault\users\001" src-entry-id="33257">
<add-attr attr-name="homeDirectory">
<value timestamp="1235162797#1" type="string">c:\home\001</value>
</add-attr>
<exec cmd="cscript.exe C:\Novell\RemoteLoader\remoteCMDExec.vbs 001
c:\home\001 add"/>
</add>
</input>
</nds>
15:46:37 9A3F8BA0 Drvrs: AD FS Driver ST:Remote Interface Driver:
Document sent.
15:46:37 9A305BA0 Drvrs: AD FS Driver :Remote Interface Driver:
Received.
15:46:37 9A305BA0 Drvrs: AD FS Driver :
<nds dtdversion="1.1" ndsversion="8.7">
<source>
<product asn1id="" build="20080229_143300"
instance="\IDVAULT\idvault\servers\DriverSet\AD FS Driver"
version="3.5.3">AD</product>
<contact>Novell, Inc.</contact>
</source>
<output>
<status event-id="oes2-idvault#20090220204637#1#1" level="error"
text1="subscriber parse" type="driver-general">
<message>Invalid XDS document. 'add' cannot have child element
'exec'</message>
<xds-path>/nds/input/add[@event-id='oes2-idvault#20090220204637#1#1'][@class-name='user'][@src-dn='\IDVAULT\idvault\users\001'][@class-name='user']/exec</xds-path>
</status>
</output>
</nds>
**********************************************

It says I have an invalid XDS document and I'm not sure what I need to
change to execute that script. The command is right cause I've tried it
from the windows command prompt and my user has the appropriate
permissions set for cscript.exe.

Any help would be greatly appreciated!
-B


--
brembold
------------------------------------------------------------------------
brembold's Profile: http://forums.novell.com/member.php?userid=4186
View this thread: http://forums.novell.com/showthread.php?t=361390