1

Its been a while...

I have the command line arg:

xml sel -t  -v "computer/general/name" nsk1501901173m.xml > test.txt

that produces the results I want in the text document specified but I need to run it through a VBScript and for the life of me I cannot figure it out... any ideas?

1 Answer 1

1

You must use the WScript.Shell object to execute the app and the cmd /c (command shell with the /C parameter) before to pass your app arguments , check this sample

Set objShell = CreateObject("WScript.Shell")
objShell.run "cmd /c xml sel -t  -v ""computer/general/name"" nsk1501901173m.xml > test.txt",1,true

Remember which script must be executed from the same location where the xml.exe app is located or even better add the location of xml.exe app to the PATH

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.