I need to write VBS WScript.Echo output to text or cvs

前端 未结 3 1866
广开言路
广开言路 2021-01-12 04:19

I am attempting to write a VBScript that will list all of the installed application on a system in a text file or csv. I was able to find an existing code to list all of the

3条回答
  •  温柔的废话
    2021-01-12 05:18

    In addition to Ansgar's top-rated answer, changing

    Set f = fso.OpenTextFile("C:\output.txt", 2)
    

    to

    Set f = fso.CreateTextFile("C:\output.txt", 2)
    

    allows VBS script to create the output files rather than requiring an existing blank file to already be in the destination.

提交回复
热议问题