문제

What is the difference between the WSH and WScript objects?

this.wsf:

<?xml version="1.0" encoding="utf-8"?>
<package>
    <job id="this">
        <?job error="true" debug="true"?>
        <script>
            this;
            debugger;
        </script>
    </job>
</package>

Double click on the WSF file, or execute this command to debug with Visual Studio:

wscript /d /x this.wsf

In Visual Studio, when you hover over this, you see two objects: WSH and WScript.

Which should be used?

도움이 되었습니까?

해결책

They are the same object, so it doesn't matter which one you use, but all the examples use WScript.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top